Fix tests for UserInfoController.

This commit is contained in:
Shane Kilkelly 2016-09-22 13:37:27 +01:00
parent a3ace1fccd
commit 7f24dd6f55

View file

@ -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", ->