From 183e8cfa9c9a6312990565594b699fd49e070f9f Mon Sep 17 00:00:00 2001 From: jomo Date: Wed, 3 Feb 2016 03:00:03 +0100 Subject: [PATCH] fix tests for f088c27012c0c49ad47538373d083311dccaf7d9 --- test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index 6cade92..aced6ca 100644 --- a/test/test.js +++ b/test/test.js @@ -293,7 +293,7 @@ describe("Crafatar", function() { var url = "http://localhost:3000/%61%76%61%74%61%72%73/%6a%6f%6d%6f"; // avatars/jomo request.get(url, function(error, res, body) { assert.ifError(error); - assert.strictEqual(res.statusCode, 200); + assert.strictEqual(res.statusCode, 201); assert_headers(res); assert(res.headers.etag); assert.strictEqual(res.headers["content-type"], "image/png"); @@ -322,7 +322,7 @@ describe("Crafatar", function() { function req() { request.get(url, function(error, res, body) { assert.ifError(error); - assert.strictEqual(res.statusCode, 200); + assert.strictEqual(res.statusCode === 201 || res.statusCode === 200, true); assert_headers(res); assert(res.headers.etag); assert.strictEqual(res.headers["content-type"], "image/png"); @@ -763,7 +763,7 @@ describe("Crafatar", function() { done(); } else { assert.strictEqual(res.headers["content-type"], "image/png"); - assert.strictEqual(res.statusCode, 200); + assert.strictEqual(res.statusCode, res.headers["x-storage-type"] === "downloaded" ? 201 : 200); assert(res.headers.etag); assert.strictEqual(res.headers.etag, '"' + hash + '"'); assert_cache(location.url, res.headers.etag, function() {