mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Add challenge join test
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user