Эх сурвалжийг харах

Fix callback being defined in wrong describe block

Alasdair Smith 8 жил өмнө
parent
commit
2529ed756a

+ 6 - 0
services/web/test/unit/coffee/SudoMode/SudoModeMiddlewearTests.coffee

@@ -105,6 +105,12 @@ describe 'SudoModeMiddlewear', ->
 		describe 'when external auth is being used', ->
 			beforeEach ->
 				@externalAuth = true
+				@call = (cb) =>
+					@req = {externalAuthenticationSystemUsed: sinon.stub().returns(@externalAuth)}
+					@res = {redirect: sinon.stub()}
+					@next = sinon.stub()
+					@SudoModeMiddlewear.protectPage @req, @res, @next
+					cb()
 
 			it 'should immediately return next with no args', (done) ->
 				@call () =>