From dc79ca2f280075f208d4fa817f26e4ea1fac8c5b Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Wed, 4 Sep 2024 12:40:15 +0200 Subject: [PATCH] Update unit tests for api_anonymous, return empty with http/200 instead of http/404 --- tests/index5.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/index5.js b/tests/index5.js index 060386f..692abc9 100644 --- a/tests/index5.js +++ b/tests/index5.js @@ -142,7 +142,7 @@ var moment = require("moment"); .set(test.logs.header.name, test.logs.header.value) .set("Accept", "application/json") .end(function (err, res) { - res.status.should.equal(404); + res.status.should.equal(200); should.exist(res.header["content-type"]); should.exist(res.header["server"]); res.header["content-type"].should.match(new RegExp("json", "g")); @@ -192,7 +192,7 @@ var moment = require("moment"); .set("Accept", "application/json") .end(function (err, res) { console.log(res.text); - res.status.should.equal(404); // return 404 as it is not enable in user settings. + res.status.should.equal(200); // return 404 as it is not enable in user settings. should.exist(res.header["content-type"]); should.exist(res.header["server"]); res.header["content-type"].should.match(new RegExp("json", "g"));