WIP: trying to get acceptance tests to pass
This commit is contained in:
@@ -29,6 +29,7 @@ describe "AuthenticationController", ->
|
||||
untrackSession: sinon.stub()
|
||||
revokeAllUserSessions: sinon.stub().callsArgWith(1, null)
|
||||
"../../infrastructure/Modules": @Modules = {hooks: {fire: sinon.stub().callsArgWith(2, null, [])}}
|
||||
"../SudoMode/SudoModeHandler": @SudoModeHandler = {activateSudoMode: sinon.stub().callsArgWith(1, null)}
|
||||
@user =
|
||||
_id: ObjectId()
|
||||
email: @email = "USER@example.com"
|
||||
|
||||
@@ -28,6 +28,7 @@ describe 'SudoModeController', ->
|
||||
'../Authentication/AuthenticationController': @AuthenticationController
|
||||
'../../infrastructure/Mongoose': {mongo: {ObjectId: () -> 'some_object_id'}}
|
||||
'../User/UserGetter': @UserGetter
|
||||
'settings-sharelatex': @Settings = {}
|
||||
|
||||
describe 'sudoModePrompt', ->
|
||||
beforeEach ->
|
||||
|
||||
@@ -20,6 +20,9 @@ describe 'SudoModeHandler', ->
|
||||
'../../infrastructure/RedisWrapper': @RedisWrapper
|
||||
'logger-sharelatex': @logger = {log: sinon.stub(), err: sinon.stub()}
|
||||
'../Authentication/AuthenticationManager': @AuthenticationManager = {}
|
||||
'settings-sharelatex': @Settings = {}
|
||||
'../V1/V1Handler': @V1Handler = {authWithV1: sinon.stub()}
|
||||
'../User/UserGetter': @UserGetter = {getUser: sinon.stub()}
|
||||
|
||||
describe '_buildKey', ->
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ describe 'SudoModeMiddlewear', ->
|
||||
'./SudoModeHandler': @SudoModeHandler
|
||||
'../Authentication/AuthenticationController': @AuthenticationController
|
||||
'logger-sharelatex': {log: sinon.stub(), err: sinon.stub()}
|
||||
'settings-sharelatex': @Settings = {}
|
||||
|
||||
describe 'protectPage', ->
|
||||
beforeEach ->
|
||||
|
||||
Reference in New Issue
Block a user