Skip to content

Commit

Permalink
Add missig tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luisrudge committed Sep 21, 2018
1 parent 6d39e10 commit c514e61
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/auth/oauth-with-idtoken-validation.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ var createCertificate = function(cb) {
};

describe('OAUthWithIDTokenValidation', function() {
describe('constructor', function() {
it('validates `oauth` is required', function() {
expect(function() {
new OAUthWithIDTokenValidation();
}).to.throw('Missing OAuthAuthenticator param');
});
it('validates `options` is required', function() {
expect(function() {
new OAUthWithIDTokenValidation({});
}).to.throw('Missing authenticator options');
});
it('validates `oauth` is required', function() {
expect(function() {
new OAUthWithIDTokenValidation({}, 'asd');
}).to.throw('The authenticator options must be an object');
});
});
describe('#create', function() {
this.afterEach(function() {
if (jwt.verify.restore) {
Expand Down

0 comments on commit c514e61

Please sign in to comment.