mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
start testing SudoModoController
This commit is contained in:
parent
4d662f23de
commit
27842996aa
2 changed files with 20 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
UserLocator = require "../User/UserLocator"
|
|
||||||
Settings = require "settings-sharelatex"
|
Settings = require "settings-sharelatex"
|
||||||
logger = require 'logger-sharelatex'
|
logger = require 'logger-sharelatex'
|
||||||
SudoModeHandler = require './SudoModeHandler'
|
SudoModeHandler = require './SudoModeHandler'
|
||||||
|
|
|
@ -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 ->
|
Loading…
Reference in a new issue