From 2529ed756abab0f174ddd43f1f7aa3a71d343b22 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 26 Feb 2018 12:27:54 +0000 Subject: [PATCH] Fix callback being defined in wrong describe block --- .../unit/coffee/SudoMode/SudoModeMiddlewearTests.coffee | 6 ++++++ 1 file changed, 6 insertions(+) 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 () =>