mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-12 15:05:30 +00:00
Fix test
This commit is contained in:
parent
f65ca3cf48
commit
c141ee6d1c
1 changed files with 8 additions and 2 deletions
|
|
@ -46,15 +46,21 @@ describe('Invite to Group Controller', function() {
|
|||
describe('inviteNewUsers', function() {
|
||||
beforeEach(function() {
|
||||
scope.group = specHelper.newGroup({
|
||||
type: 'party',
|
||||
$save: sinon.stub().returns({
|
||||
then: function(cb) { cb(); }
|
||||
})
|
||||
});
|
||||
|
||||
sandbox.stub(groups.Group, 'invite');
|
||||
});
|
||||
|
||||
context('pre-invite', function() {
|
||||
it('saves the group', function() {
|
||||
context('if the party does not already exist', function() {
|
||||
beforeEach(function() {
|
||||
delete scope.group._id;
|
||||
});
|
||||
|
||||
it('saves the group if a new group is being created', function() {
|
||||
scope.inviteNewUsers('uuid');
|
||||
expect(scope.group.$save).to.be.calledOnce;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue