mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix tests for UserInfoController.
This commit is contained in:
parent
a3ace1fccd
commit
7f24dd6f55
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ describe "UserInfoController", ->
|
|||
"./UserDeleter": @UserDeleter
|
||||
"logger-sharelatex": log:->
|
||||
"sanitizer":@sanitizer
|
||||
'../Authentication/AuthenticationController': @AuthenticationController = {getLoggedInUserId: sinon.stub()}
|
||||
|
||||
@req = new MockRequest()
|
||||
@res = new MockResponse()
|
||||
|
@ -40,6 +41,7 @@ describe "UserInfoController", ->
|
|||
@req.session.user = @user
|
||||
@UserInfoController.sendFormattedPersonalInfo = sinon.stub()
|
||||
@UserGetter.getUser = sinon.stub().callsArgWith(2, null, @user)
|
||||
@AuthenticationController.getLoggedInUserId = sinon.stub().returns(@user._id)
|
||||
@UserInfoController.getLoggedInUsersPersonalInfo(@req, @res, @next)
|
||||
|
||||
it "should call sendFormattedPersonalInfo", ->
|
||||
|
|
Loading…
Reference in a new issue