mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 10:12:21 +00:00
use sandbox.stub instead of sandbox.spy
This commit is contained in:
parent
68c3c2973b
commit
ee09bee1e2
1 changed files with 9 additions and 5 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue