From 20835a79e2cf34beed9d3a67a95329d0254f7df8 Mon Sep 17 00:00:00 2001 From: Douglas Lovell Date: Tue, 26 Jun 2018 13:45:31 -0300 Subject: [PATCH] Repair not logged in subscription controller test --- .../coffee/Subscription/SubscriptionControllerTests.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/services/web/test/unit/coffee/Subscription/SubscriptionControllerTests.coffee b/services/web/test/unit/coffee/Subscription/SubscriptionControllerTests.coffee index 0fb9344108..f6808727d1 100644 --- a/services/web/test/unit/coffee/Subscription/SubscriptionControllerTests.coffee +++ b/services/web/test/unit/coffee/Subscription/SubscriptionControllerTests.coffee @@ -124,13 +124,11 @@ describe "SubscriptionController", -> @UserGetter = getUser: sinon.stub().callsArgWith(2, null, null) @res.callback = done - @SubscriptionController.plansPage(@req, @res) @AuthenticationController = getLoggedInUser: sinon.stub().callsArgWith(1, null, null) getLoggedInUserId: sinon.stub().returns(null) getSessionUser: sinon.stub().returns(null) isUserLoggedIn: sinon.stub().returns(false) - @SubscriptionController = SandboxedModule.require modulePath, requires: '../Authentication/AuthenticationController': @AuthenticationController './SubscriptionHandler': @SubscriptionHandler @@ -146,6 +144,7 @@ describe "SubscriptionController", -> "../User/UserGetter": @UserGetter "./RecurlyWrapper": @RecurlyWrapper = {} "./FeaturesUpdater": @FeaturesUpdater = {} + @SubscriptionController.plansPage(@req, @res) it 'should not fetch the current user', (done) -> @UserGetter.getUser.callCount.should.equal 0 @@ -500,4 +499,4 @@ describe "SubscriptionController", -> @SubscriptionHandler.updateSubscription.calledWith(@user, "collaborator-annual", "COLLABORATORCODEHERE").should.equal true done() - @SubscriptionController.processUpgradeToAnnualPlan @req, @res \ No newline at end of file + @SubscriptionController.processUpgradeToAnnualPlan @req, @res