mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 19:47:03 +00:00
Add challenge join test
This commit is contained in:
parent
0b85dc3e27
commit
d3da391f6e
1 changed files with 10 additions and 1 deletions
|
|
@ -411,7 +411,16 @@ describe('Challenges Controller', function() {
|
|||
|
||||
describe('User interactions', function() {
|
||||
describe('join', function() {
|
||||
it('calls challenge join endpoint');
|
||||
it('calls challenge.$join', function(){
|
||||
var challenge = specHelper.newChallenge({
|
||||
_id: 'challenge-to-join',
|
||||
$join: sandbox.spy()
|
||||
});
|
||||
|
||||
scope.join(challenge);
|
||||
|
||||
expect(challenge.$join).to.be.calledOnce;
|
||||
});
|
||||
});
|
||||
|
||||
describe('clickLeave', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue