mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
fix test
This commit is contained in:
@@ -1016,11 +1016,11 @@ describe('Controllers', function () {
|
|||||||
done();
|
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) {
|
request(nconf.get('url') + '/me/bookmarks', { json: true }, function (err, res, body) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
assert.equal(res.statusCode, 401);
|
assert.equal(res.statusCode, 200);
|
||||||
assert.equal(body, 'not-authorized');
|
assert(body.indexOf('Login to your account') !== -1);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user