Skip to content

Node.js based forum software built for the modern web

fix test

Barış Soner Uşaklı2455df438c55
diff --git a/test/controllers.js b/test/controllers.js
index 5f42cc698c..43dd40b093 100644
--- a/test/controllers.js
+++ b/test/controllers.js
@@ -1016,11 +1016,11 @@ describe('Controllers', function () {
done();
});
});
- it('should 401 if user is not logged in', function (done) {
+ it('should redirect to login if user is not logged in', function (done) {
request(nconf.get('url') + '/me/bookmarks', { json: true }, function (err, res, body) {
assert.ifError(err);
- assert.equal(res.statusCode, 401);
- assert.equal(body, 'not-authorized');
+ assert.equal(res.statusCode, 200);
+ assert(body.indexOf('Login to your account') !== -1);
done();
});
});