Skip to content

Commit d3163ff

Browse files
TimvdEijndencaitp
authored andcommitted
docs(tutorial): fix controller unit tests to match phonecat / avoid ReferenceError
fix 'ReferenceError: PhoneDetailCtrl is not defined' & 'ReferenceError: PhoneListCtrl is not defined' in Karma unit tests Closes angular#7421
1 parent b64c709 commit d3163ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/tutorial/step_11.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe('PhoneCat controllers', function() {
202202
respond([{name: 'Nexus S'}, {name: 'Motorola DROID'}]);
203203

204204
scope = $rootScope.$new();
205-
ctrl = $controller(PhoneListCtrl, {$scope: scope});
205+
ctrl = $controller('PhoneListCtrl', {$scope: scope});
206206
}));
207207

208208

@@ -237,7 +237,7 @@ describe('PhoneCat controllers', function() {
237237

238238
$routeParams.phoneId = 'xyz';
239239
scope = $rootScope.$new();
240-
ctrl = $controller(PhoneDetailCtrl, {$scope: scope});
240+
ctrl = $controller('PhoneDetailCtrl', {$scope: scope});
241241
}));
242242

243243

0 commit comments

Comments
 (0)