Explorar el Código

add test for invalid file updates (#14)

jomo hace 10 años
padre
commit
8ee862596b
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      test/test.js

+ 7 - 1
test/test.js

@@ -144,7 +144,7 @@ describe('Crafatar', function() {
     });
     });
   });
   });
 
 
-  describe('Mojang Errors', function() {
+  describe('Errors', function() {
     before(function() {
     before(function() {
       cache.get_redis().flushall();
       cache.get_redis().flushall();
     });
     });
@@ -187,5 +187,11 @@ describe('Crafatar', function() {
         done();
         done();
       });
       });
     });
     });
+    it("should handle file updates on invalid files", function(done) {
+      assert.doesNotThrow(function() {
+        cache.update_timestamp("0123456789abcdef0123456789abcdef", "invalid-file.png");
+      });
+      done();
+    });
   });
   });
 });
 });