Commit 5cfe52d5 authored by Pascal Hartig's avatar Pascal Hartig

Angular tests rebased and updated to use bower components

parent 552fad06
......@@ -4,5 +4,8 @@
"dependencies": {
"angular": "~1.0.5",
"todomvc-common": "~0.1.0"
},
"devDependencies": {
"angular-mocks": "~1.0.5"
}
}
}
\ No newline at end of file
......@@ -3,8 +3,8 @@ basePath = '../../';
files = [
JASMINE,
JASMINE_ADAPTER,
'js/libs/angular/angular.min.js',
'test/libs/angular-mocks.js',
'components/angular/angular.js',
'components/angular-mocks/angular-mocks.js',
'js/**/*.js',
'test/unit/**/*.js'
];
......
/*global describe, it, beforeEach, inject, expect, angular*/
(function () {
'use strict';
......
/*global describe, it, beforeEach, inject, expect*/
(function () {
'use strict';
......@@ -100,7 +101,7 @@
it('should count Todos correctly', function () {
expect(scope.todos.length).toBe(5);
expect(scope.remainingCount).toBe(3);
expect(scope.doneCount).toBe(2);
expect(scope.completedCount).toBe(2);
expect(scope.allChecked).toBeFalsy();
});
......@@ -116,15 +117,15 @@
expect(scope.todos.length).toBe(4);
});
it('clearDoneTodos() should clear completed Todos', function () {
scope.clearDoneTodos();
it('clearCompletedTodos() should clear completed Todos', function () {
scope.clearCompletedTodos();
expect(scope.todos.length).toBe(3);
});
it('markAll() should mark all Todos completed', function () {
scope.markAll();
scope.$digest();
expect(scope.doneCount).toBe(5);
expect(scope.completedCount).toBe(5);
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment