mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #1478 from sharelatex/cmg-fix-subscription-tests
Fix subscription page failing tests GitOrigin-RevId: dc8bef0aa4996b457d3c770e3ad446315b8bed6f
This commit is contained in:
parent
24dd3698e2
commit
ef1bbba618
1 changed files with 4 additions and 3 deletions
|
@ -144,7 +144,7 @@ describe "SubscriptionController", ->
|
|||
it "should redirect to the subscription dashboard", (done)->
|
||||
@LimitationsManager.userHasV1OrV2Subscription.callsArgWith(1, null, true)
|
||||
@res.redirect = (url)=>
|
||||
url.should.equal "/user/subscription"
|
||||
url.should.equal "/user/subscription?hasSubscription=true"
|
||||
done()
|
||||
@SubscriptionController.paymentPage(@req, @res)
|
||||
|
||||
|
@ -153,7 +153,7 @@ describe "SubscriptionController", ->
|
|||
@LimitationsManager.userHasV1OrV2Subscription.callsArgWith(1, null, false)
|
||||
@PlansLocator.findLocalPlanInSettings.returns(null)
|
||||
@res.redirect = (url)=>
|
||||
url.should.equal "/user/subscription"
|
||||
url.should.equal "/user/subscription?hasSubscription=true"
|
||||
done()
|
||||
@SubscriptionController.paymentPage(@req, @res)
|
||||
|
||||
|
@ -190,7 +190,7 @@ describe "SubscriptionController", ->
|
|||
@LimitationsManager.userHasV1OrV2Subscription.callsArgWith(1, null, false)
|
||||
@SubscriptionHandler.validateNoSubscriptionInRecurly = sinon.stub().yields(null, false)
|
||||
@res.redirect = (url)=>
|
||||
url.should.equal "/user/subscription"
|
||||
url.should.equal "/user/subscription?hasSubscription=true"
|
||||
done()
|
||||
@SubscriptionController.paymentPage(@req, @res)
|
||||
|
||||
|
@ -208,6 +208,7 @@ describe "SubscriptionController", ->
|
|||
memberGroupSubscriptions: @memberGroupSubscriptions = { 'group-subscriptions': 'mock' }
|
||||
})
|
||||
@SubscriptionViewModelBuilder.buildViewModel.returns(@plans = {'plans': 'mock'})
|
||||
@LimitationsManager.userHasV1OrV2Subscription.callsArgWith(1, null, false)
|
||||
@res.render = (view, @data) =>
|
||||
expect(view).to.equal 'subscriptions/dashboard'
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue