From ee09bee1e2ca914e39a00ccab0190742af406c38 Mon Sep 17 00:00:00 2001 From: Kaitlin Hipkin Date: Wed, 16 Mar 2016 00:55:20 -0400 Subject: [PATCH] use sandbox.stub instead of sandbox.spy --- test/spec/controllers/partyCtrlSpec.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/spec/controllers/partyCtrlSpec.js b/test/spec/controllers/partyCtrlSpec.js index 6a0278557e..53692c040b 100644 --- a/test/spec/controllers/partyCtrlSpec.js +++ b/test/spec/controllers/partyCtrlSpec.js @@ -9,10 +9,10 @@ describe("Party Controller", function() { User = { user: user, sync: sandbox.spy, - set: function() {} + set: function() {} // no-op } - sandbox.spy(User, "set"); + sandbox.stub(User, 'set'); module(function($provide) { $provide.value('User', User); @@ -37,9 +37,13 @@ describe("Party Controller", function() { }); describe('initialization', function() { + beforeEach(function() { + sandbox.stub(rootScope, 'openModal'); + }); + context('party has 1 member', function() { beforeEach(function() { - sinon.stub(groups.party.memberCount).returns(1); + scope.group = { memberCount: 1 }; }); it('awards no new achievements', function() { @@ -50,7 +54,7 @@ describe("Party Controller", function() { context('party has 2 members', function() { beforeEach(function() { - sinon.stub(groups.party.memberCount).returns(2); + scope.group = { memberCount: 2 }; }); context('user does not have "Party Up" achievement', function() { @@ -70,7 +74,7 @@ describe("Party Controller", function() { context('party has 4 members', function() { beforeEach(function() { - sinon.stub(groups.party.memberCount).returns(4); + scope.group = { memberCount: 4 }; }); context('user has "Party Up" but not "Party On" achievement', function() {