Explorar o código

Test invalid render type

Jake %!s(int64=10) %!d(string=hai) anos
pai
achega
9bebaff48e
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      test/test.js

+ 7 - 0
test/test.js

@@ -229,6 +229,13 @@ describe("Server", function() {
       });
     });
 
+    it("should return a 422 (invalid render type)", function(done) {
+      request.get("http://localhost:3000/renders/side/Jake0oo0", function(error, res, body) {
+        assert.equal(422, res.statusCode);
+        done();
+      });
+    });
+
     // testing all paths for invalid id formats
     var locations = ["avatars", "capes", "skins", "renders/head"]
     for (var l in locations) {