var Strategy = require('../lib/strategy');

describe('Strategy', function() {
    var strategy = new Strategy({jwtFromRequest: function(){}, secretOrKey: 'secret'}, function() {});

    it('should be named jwt', function() {
        expect(strategy.name).to.equal('jwt');
    });


    it('should throw if constructed without a verify callback', function() {
        expect(function() {
            var s = new Strategy({jwtFromRequest: function(r) {}, secretOrKey: 'secret'});
        }).to.throw(TypeError, "JwtStrategy requires a verify callback");
    });


    it('should throw if constructed without a secretOrKey arg', function() {
        expect(function() {
            var s = new Strategy({jwtFromRequest: function(r) {}, secretOrKey: null}, function() {});
        }).to.throw(TypeError, 'JwtStrategy requires a secret or key');
    });


    it('should throw if constructed without a jwtFromRequest arg', function() {
        expect(function() {
            var s = new Strategy({secretOrKey: 'secret'}, function() {});
        }).to.throw(TypeError);
    });
});

@@ -591,23 +591,40 @@
 tructed 
-without
+neither a secretOrKey or
  a secre
@@ -629,16 +629,24 @@
 retOrKey
+Provider
  arg', f
@@ -779,32 +779,32 @@
 function() %7B%7D);%0A
-
         %7D).to.th
@@ -861,32 +861,409 @@
 ey');%0A    %7D);%0A%0A%0A
+    it('should throw if constructed with both a secretOrKey and a secretOrKeyProvider', function () %7B%0A        expect(function() %7B%0A            var s = new Strategy(%7B%0A                secretOrKey: 'secret',%0A                secretOrKeyProvider: function(req, token, done) %7B%7D,%0A                jwtFromReqeust: function(r) %7B%7D%0A            %7D);%0A        %7D).to.throw(TypeError);%0A    %7D);%0A%0A%0A
     it('should t

Add test to cover missed branch in strategy.