|
@@ -105,6 +105,12 @@ describe 'SudoModeMiddlewear', ->
|
|
|
describe 'when external auth is being used', ->
|
|
describe 'when external auth is being used', ->
|
|
|
beforeEach ->
|
|
beforeEach ->
|
|
|
@externalAuth = true
|
|
@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) ->
|
|
it 'should immediately return next with no args', (done) ->
|
|
|
@call () =>
|
|
@call () =>
|