mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
Update unit tests for api_anonymous, return empty with http/200 instead of http/404
This commit is contained in:
@@ -142,7 +142,7 @@ var moment = require("moment");
|
|||||||
.set(test.logs.header.name, test.logs.header.value)
|
.set(test.logs.header.name, test.logs.header.value)
|
||||||
.set("Accept", "application/json")
|
.set("Accept", "application/json")
|
||||||
.end(function (err, res) {
|
.end(function (err, res) {
|
||||||
res.status.should.equal(404);
|
res.status.should.equal(200);
|
||||||
should.exist(res.header["content-type"]);
|
should.exist(res.header["content-type"]);
|
||||||
should.exist(res.header["server"]);
|
should.exist(res.header["server"]);
|
||||||
res.header["content-type"].should.match(new RegExp("json", "g"));
|
res.header["content-type"].should.match(new RegExp("json", "g"));
|
||||||
@@ -192,7 +192,7 @@ var moment = require("moment");
|
|||||||
.set("Accept", "application/json")
|
.set("Accept", "application/json")
|
||||||
.end(function (err, res) {
|
.end(function (err, res) {
|
||||||
console.log(res.text);
|
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["content-type"]);
|
||||||
should.exist(res.header["server"]);
|
should.exist(res.header["server"]);
|
||||||
res.header["content-type"].should.match(new RegExp("json", "g"));
|
res.header["content-type"].should.match(new RegExp("json", "g"));
|
||||||
|
Reference in New Issue
Block a user