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 @@ ...@@ -4,5 +4,8 @@
"dependencies": { "dependencies": {
"angular": "~1.0.5", "angular": "~1.0.5",
"todomvc-common": "~0.1.0" "todomvc-common": "~0.1.0"
},
"devDependencies": {
"angular-mocks": "~1.0.5"
} }
} }
\ No newline at end of file
...@@ -3,8 +3,8 @@ basePath = '../../'; ...@@ -3,8 +3,8 @@ basePath = '../../';
files = [ files = [
JASMINE, JASMINE,
JASMINE_ADAPTER, JASMINE_ADAPTER,
'js/libs/angular/angular.min.js', 'components/angular/angular.js',
'test/libs/angular-mocks.js', 'components/angular-mocks/angular-mocks.js',
'js/**/*.js', 'js/**/*.js',
'test/unit/**/*.js' 'test/unit/**/*.js'
]; ];
......
/*global describe, it, beforeEach, inject, expect, angular*/
(function () { (function () {
'use strict'; 'use strict';
......
/*global describe, it, beforeEach, inject, expect*/
(function () { (function () {
'use strict'; 'use strict';
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
it('should count Todos correctly', function () { it('should count Todos correctly', function () {
expect(scope.todos.length).toBe(5); expect(scope.todos.length).toBe(5);
expect(scope.remainingCount).toBe(3); expect(scope.remainingCount).toBe(3);
expect(scope.doneCount).toBe(2); expect(scope.completedCount).toBe(2);
expect(scope.allChecked).toBeFalsy(); expect(scope.allChecked).toBeFalsy();
}); });
...@@ -116,15 +117,15 @@ ...@@ -116,15 +117,15 @@
expect(scope.todos.length).toBe(4); expect(scope.todos.length).toBe(4);
}); });
it('clearDoneTodos() should clear completed Todos', function () { it('clearCompletedTodos() should clear completed Todos', function () {
scope.clearDoneTodos(); scope.clearCompletedTodos();
expect(scope.todos.length).toBe(3); expect(scope.todos.length).toBe(3);
}); });
it('markAll() should mark all Todos completed', function () { it('markAll() should mark all Todos completed', function () {
scope.markAll(); scope.markAll();
scope.$digest(); 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