mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Repair not logged in subscription controller test
This commit is contained in:
parent
e0f6afcbb4
commit
20835a79e2
1 changed files with 2 additions and 3 deletions
|
@ -124,13 +124,11 @@ describe "SubscriptionController", ->
|
||||||
@UserGetter =
|
@UserGetter =
|
||||||
getUser: sinon.stub().callsArgWith(2, null, null)
|
getUser: sinon.stub().callsArgWith(2, null, null)
|
||||||
@res.callback = done
|
@res.callback = done
|
||||||
@SubscriptionController.plansPage(@req, @res)
|
|
||||||
@AuthenticationController =
|
@AuthenticationController =
|
||||||
getLoggedInUser: sinon.stub().callsArgWith(1, null, null)
|
getLoggedInUser: sinon.stub().callsArgWith(1, null, null)
|
||||||
getLoggedInUserId: sinon.stub().returns(null)
|
getLoggedInUserId: sinon.stub().returns(null)
|
||||||
getSessionUser: sinon.stub().returns(null)
|
getSessionUser: sinon.stub().returns(null)
|
||||||
isUserLoggedIn: sinon.stub().returns(false)
|
isUserLoggedIn: sinon.stub().returns(false)
|
||||||
|
|
||||||
@SubscriptionController = SandboxedModule.require modulePath, requires:
|
@SubscriptionController = SandboxedModule.require modulePath, requires:
|
||||||
'../Authentication/AuthenticationController': @AuthenticationController
|
'../Authentication/AuthenticationController': @AuthenticationController
|
||||||
'./SubscriptionHandler': @SubscriptionHandler
|
'./SubscriptionHandler': @SubscriptionHandler
|
||||||
|
@ -146,6 +144,7 @@ describe "SubscriptionController", ->
|
||||||
"../User/UserGetter": @UserGetter
|
"../User/UserGetter": @UserGetter
|
||||||
"./RecurlyWrapper": @RecurlyWrapper = {}
|
"./RecurlyWrapper": @RecurlyWrapper = {}
|
||||||
"./FeaturesUpdater": @FeaturesUpdater = {}
|
"./FeaturesUpdater": @FeaturesUpdater = {}
|
||||||
|
@SubscriptionController.plansPage(@req, @res)
|
||||||
|
|
||||||
it 'should not fetch the current user', (done) ->
|
it 'should not fetch the current user', (done) ->
|
||||||
@UserGetter.getUser.callCount.should.equal 0
|
@UserGetter.getUser.callCount.should.equal 0
|
||||||
|
|
Loading…
Reference in a new issue