From 2455df438c55e9d0b1c85faf6ed0d99ed32c04b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 9 Dec 2017 12:48:41 -0500 Subject: [PATCH] fix test --- test/controllers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); }); });