mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Refactored editTask into TaskService
This commit is contained in:
@@ -174,4 +174,20 @@ describe('Challenges Controller', function() {
|
||||
expect(scope.filterChallenges(notOwnNotMem)).to.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('editTask', function() {
|
||||
it('calls Tasks.editTask', function() {
|
||||
inject(function(Tasks) {
|
||||
sinon.stub(Tasks, 'editTask');
|
||||
var task = {
|
||||
id: 'task-id',
|
||||
type: 'todo'
|
||||
};
|
||||
|
||||
scope.editTask(task);
|
||||
expect(Tasks.editTask).to.be.calledOnce;
|
||||
expect(Tasks.editTask).to.be.calledWith(task);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user