mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
fix tests for f088c27012c0c49ad47538373d083311dccaf7d9
This commit is contained in:
parent
f088c27012
commit
183e8cfa9c
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user