 
 		describe "with an invalid plan code", ->
 			it "should redirect to the subscription dashboard", (done)->
-				@LimitationsManager.userHasSubscription.callsArgWith(1, null, false)
+				@LimitationsManager.userHasV1OrV2Subscription.callsArgWith(1, null, false)
 				@PlansLocator.findLocalPlanInSettings.returns(null)
 				@res.redirect = (url)=>
 					url.should.equal "/user/subscription"


		it "should pass annual as the plan name if the user is already on an annual plan", (done)->

			@LimitationsManager.userHasSubscription.callsArgWith(1, null, true, {planCode:"student annual with free trial"})
			@res.render = (view, opts)->
				opts.planName.should.equal "annual"
				done()


		it "should pass the plan code to the view - collaborator", (done)->

			@LimitationsManager.userHasV2Subscription.callsArgWith(1, null, true, {planCode:"free trial for Collaborator free trial 14 days"})
			@res.render = (view, opts)->
				opts.planName.should.equal "collaborator"
				done()
