more tests

This commit is contained in:
Barış Soner Uşaklı
2017-05-10 16:27:44 -04:00
parent 873801e9f3
commit 73f31640d7
4 changed files with 62 additions and 22 deletions

View File

@@ -414,6 +414,23 @@ describe('Admin Controllers', function () {
});
});
it('/ip-blacklist should 404 for regular user', function (done) {
request(nconf.get('url') + '/api/ip-blacklist', { json: true }, function (err, res, body) {
assert.ifError(err);
assert(body);
assert.equal(res.statusCode, 404);
done();
});
});
it('should load /ip-blacklist', function (done) {
request(nconf.get('url') + '/api/ip-blacklist', { jar: jar, json: true }, function (err, res, body) {
assert.ifError(err);
assert(body);
done();
});
});
it('should load /admin/appearance/themes', function (done) {
request(nconf.get('url') + '/api/admin/appearance/themes', { jar: jar, json: true }, function (err, res, body) {
assert.ifError(err);