Skip to content

Commit c421fce

Browse files
committed
Coverage
1 parent 869275e commit c421fce

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/kuzzle/constructor.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,26 @@ describe('Kuzzle constructor', () => {
750750
});
751751
});
752752

753+
it('should get the url redirection from OAUTH', function (done) {
754+
var
755+
kuzzle;
756+
757+
this.timeout(200);
758+
759+
kuzzle = new Kuzzle('nowhere', {
760+
connect: 'manual'
761+
});
762+
763+
kuzzle.query = function(queryArgs, query, options, cb) {
764+
cb(null, {result: {url: 'redirect'}});
765+
};
766+
767+
kuzzle.login('local', '1h', function() {
768+
should(kuzzle.jwtToken).be.undefined();
769+
done();
770+
});
771+
});
772+
753773
it('should send a failed loginAttempt event if logging in fails', function (done) {
754774
var
755775
kuzzle = new Kuzzle('nowhere', {connect: 'manual'}),

0 commit comments

Comments
 (0)