check status code

This commit is contained in:
Barış Soner Uşaklı
2018-11-26 17:17:43 -05:00
parent 47b2057f20
commit 0361849bb1

View File

@@ -1622,6 +1622,7 @@ describe('Controllers', function () {
it('should return osd data', function (done) { it('should return osd data', function (done) {
request(nconf.get('url') + '/osd.xml', function (err, res, body) { request(nconf.get('url') + '/osd.xml', function (err, res, body) {
assert.ifError(err); assert.ifError(err);
assert.equal(res.statusCode, 200);
assert(body); assert(body);
done(); done();
}); });
@@ -1637,6 +1638,7 @@ describe('Controllers', function () {
it('should handle topic malformed uri', function (done) { it('should handle topic malformed uri', function (done) {
request(nconf.get('url') + '/topic/1/a%AFc', function (err, res, body) { request(nconf.get('url') + '/topic/1/a%AFc', function (err, res, body) {
assert.ifError(err); assert.ifError(err);
assert.equal(res.statusCode, 200);
assert(body); assert(body);
done(); done();
}); });
@@ -1645,6 +1647,7 @@ describe('Controllers', function () {
it('should handle category malformed uri', function (done) { it('should handle category malformed uri', function (done) {
request(nconf.get('url') + '/category/1/a%AFc', function (err, res, body) { request(nconf.get('url') + '/category/1/a%AFc', function (err, res, body) {
assert.ifError(err); assert.ifError(err);
assert.equal(res.statusCode, 200);
assert(body); assert(body);
done(); done();
}); });