mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Simplify editTask
This commit is contained in:
@@ -22,17 +22,9 @@ describe('Tasks Controller', function() {
|
||||
});
|
||||
|
||||
describe('editTask', function() {
|
||||
it('calls Tasks.editTask', function() {
|
||||
it('is 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);
|
||||
expect(scope.editTask).to.eql(Tasks.editTask);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user