mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 19:47:03 +00:00
Add test for edit
This commit is contained in:
parent
6aae668b8c
commit
60ee0c911f
1 changed files with 15 additions and 1 deletions
|
|
@ -510,7 +510,21 @@ describe('Challenges Controller', function() {
|
|||
});
|
||||
|
||||
describe('edit', function() {
|
||||
it('transitions to edit page');
|
||||
it('transitions to edit page', function() {
|
||||
sandbox.stub(state, 'transitionTo');
|
||||
var challenge = specHelper.newChallenge({
|
||||
_id: 'challenge-id'
|
||||
});
|
||||
|
||||
scope.edit(challenge);
|
||||
|
||||
expect(state.transitionTo).to.be.calledOnce;
|
||||
expect(state.transitionTo).to.be.calledWith(
|
||||
'options.social.challenges.edit',
|
||||
{ cid: challenge._id },
|
||||
{ reload: true, inherit: false, notify: true }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('discard', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue