Unit test broken after: git checkout -f step-7 #203
Description
I adjusted the browsers line in karma.conf.js to use Firefox rather than Chrome.
I'm following the Angular phonecat tutorial using Fedora 20.
https://code.angularjs.org/1.2.26/docs/tutorial/step_07
Running the unit tests with "npm test" and leaving Firefox open shows the effect of each git checkout step. The tests pass for steps 1 to 6, but start failing at step 7.
Error message:
Error: [ng:areq] Argument 'PhoneListCtrl' is not a function, got undefined
Proposed one line fix for controllersSpec.js:
diff --git a/test/unit/controllersSpec.js b/test/unit/controllersSpec.js
index a755e4a..a929b3f 100644
--- a/test/unit/controllersSpec.js
+++ b/test/unit/controllersSpec.js
@@ -6,7 +6,7 @@ describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function(){
var scope, ctrl, $httpBackend;
- beforeEach(module('phonecatApp'));
- beforeEach(module('phonecatControllers'));
beforeEach(inject(function($httpBackend, $rootScope, $controller) {
$httpBackend = $httpBackend;
$httpBackend.expectGET('phones/phones.json').
There are additional failures in further steps - but let's start by fixing this step before tackling others.
Firefox version: 32.0.2
$ node_modules/bower/bin/bower list
bower check-new Checking for new versions of the project dependencies..
angular-phonecat#0.0.0 /angular-phonecat
├── #1.2.26 (1.2.27-build.512+sha.e713f36 available, latest is 1.3.0-rc.5)
├─┬ angular-animate#1.2.26 extraneous (1.2.27-build.512+sha.e713f36 available, latest is 1.3.0-rc.5)
│ └── #1.2.26 (latest is 1.3.0-rc.5)
├─┬ angular-mocks#1.2.26 (1.2.27-build.512+sha.e713f36 available, latest is 1.3.0-rc.5)
│ └── #1.2.26
├─┬ angular-resource#1.2.26 extraneous (1.2.27-build.512+sha.e713f36 available, latest is 1.3.0-rc.5)
│ └── #1.2.26
├─┬ angular-route#1.2.26 (1.2.27-build.512+sha.e713f36 available, latest is 1.3.0-rc.5)
│ └── #1.2.26
├─┬ bootstrap#3.1.1 (latest is 3.2.0)
│ └── jquery#1.10.2 (2.1.1 available)
└── jquery#1.10.2 (latest is 2.1.1)