habitica/test/spec/controllers/tasksCtrlSpec.js

32 lines
708 B
JavaScript
Raw Normal View History

2015-06-17 04:11:04 +00:00
'use strict';
describe('Tasks Controller', function() {
var $rootScope, scope, user, ctrl;
beforeEach(function() {
user = specHelper.newUser();
module(function($provide) {
$provide.value('User', {user: user});
$provide.value('Guide', {});
});
inject(function($rootScope, $controller){
scope = $rootScope.$new();
$controller('RootCtrl', {$scope: scope, User: {user: user}});
ctrl = $controller('TasksCtrl', {$scope: scope, User: {user: user}});
});
});
describe('editTask', function() {
2015-06-17 12:51:07 +00:00
it('is Tasks.editTask', function() {
2015-06-17 04:11:04 +00:00
inject(function(Tasks) {
2015-06-17 12:51:07 +00:00
expect(scope.editTask).to.eql(Tasks.editTask);
2015-06-17 04:11:04 +00:00
});
});
});
});