start testing SudoModoController

This commit is contained in:
Shane Kilkelly 2017-05-10 15:15:57 +01:00
parent 4d662f23de
commit 27842996aa
2 changed files with 20 additions and 1 deletions

View file

@ -1,4 +1,3 @@
UserLocator = require "../User/UserLocator"
Settings = require "settings-sharelatex"
logger = require 'logger-sharelatex'
SudoModeHandler = require './SudoModeHandler'

View file

@ -0,0 +1,20 @@
SandboxedModule = require('sandboxed-module')
sinon = require 'sinon'
should = require("chai").should()
MockRequest = require "../helpers/MockRequest"
MockResponse = require "../helpers/MockResponse"
modulePath = '../../../../app/js/Features/SudoMode/SudoModeController'
describe 'SudoModeController', ->
beforeEach ->
@user =
_id: 'abcd'
email: 'user@example.com'
@UserGetter =
getUser: sinon.stub().callsArgWith(2, null, @user)
@SudoModeHandler =
isSudoModeActive: sinon.stub()
activateSudoMode: sinon.stub()
# describe '', ->
# beforeEach ->