Sfoglia il codice sorgente

Fix error not being defined in wrong describe block

Alasdair Smith 8 anni fa
parent
commit
192eb8b44f

+ 1 - 1
services/web/test/unit/coffee/Authentication/AuthenticationControllerTests.coffee

@@ -99,6 +99,7 @@ describe "AuthenticationController", ->
 			@req.session.save = sinon.stub().callsArgWith(0, null)
 			@req.sessionStore = {generate: sinon.stub()}
 			@passport.authenticate.callsArgWith(1, null, @user, @info)
+			@err = new Error('woops')
 
 		it 'should call passport.authenticate', () ->
 			@AuthenticationController.passportLogin @req, @res, @next
@@ -107,7 +108,6 @@ describe "AuthenticationController", ->
 		describe 'when authenticate produces an error', ->
 
 			beforeEach ->
-				@err = new Error('woops')
 				@passport.authenticate.callsArgWith(1, @err)
 
 			it 'should return next with an error', () ->