diff --git a/services/web/test/unit/coffee/SudoMode/SudoModeMiddlewearTests.coffee b/services/web/test/unit/coffee/SudoMode/SudoModeMiddlewearTests.coffee index 00e8d0ae57..d17c397d3c 100644 --- a/services/web/test/unit/coffee/SudoMode/SudoModeMiddlewearTests.coffee +++ b/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 () =>