|
@@ -332,7 +332,7 @@ describe "SubscriptionController sanboxed", ->
|
|
|
@req.body =
|
|
@req.body =
|
|
|
planName:"student"
|
|
planName:"student"
|
|
|
|
|
|
|
|
- @res.redirect = ()=>
|
|
|
|
|
|
|
+ @res.send = ()=>
|
|
|
@SubscriptionHandler.updateSubscription.calledWith(@user, "student-annual", "STUDENTCODEHERE").should.equal true
|
|
@SubscriptionHandler.updateSubscription.calledWith(@user, "student-annual", "STUDENTCODEHERE").should.equal true
|
|
|
done()
|
|
done()
|
|
|
|
|
|
|
@@ -343,9 +343,8 @@ describe "SubscriptionController sanboxed", ->
|
|
|
@req.body =
|
|
@req.body =
|
|
|
planName:"collaborator"
|
|
planName:"collaborator"
|
|
|
|
|
|
|
|
- @res.redirect = (url)=>
|
|
|
|
|
|
|
+ @res.send = (url)=>
|
|
|
@SubscriptionHandler.updateSubscription.calledWith(@user, "collaborator-annual", "COLLABORATORCODEHERE").should.equal true
|
|
@SubscriptionHandler.updateSubscription.calledWith(@user, "collaborator-annual", "COLLABORATORCODEHERE").should.equal true
|
|
|
- url.should.equal "/user/subscription/thank-you"
|
|
|
|
|
done()
|
|
done()
|
|
|
|
|
|
|
|
@SubscriptionController.processUpgradeToAnnualPlan @req, @res
|
|
@SubscriptionController.processUpgradeToAnnualPlan @req, @res
|