Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 6ce9cf4

Browse files
committed
Attempt to fix tests. Fixes #13951
1 parent 75ad142 commit 6ce9cf4

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

test/ng/controllerSpec.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,17 @@ describe('$controller', function() {
5858
});
5959

6060
it('should return true when having an existing controller', function() {
61-
var FooCtrl = function($scope) { $scope.foo = 'foo'; },
62-
scope = {},
63-
ctrl;
61+
var FooCtrl = function($scope) { $scope.foo = 'foo'; };
6462

6563
$controllerProvider.register({FooCtrl: FooCtrl});
66-
67-
ctrl = $controller('FooCtrl', {$scope: scope});
68-
expect(ctrl.has('FooCtrl')).toBe(true);
64+
expect($controllerProvider.has('FooCtrl')).toBe(true);
6965
});
7066

7167
it('should return false when not having a non existing controller', function() {
72-
var FooCtrl = function($scope) { $scope.foo = 'foo'; },
73-
scope = {},
74-
ctrl;
68+
var FooCtrl = function($scope) { $scope.foo = 'foo'; };
7569

7670
$controllerProvider.register({FooCtrl: FooCtrl});
77-
78-
ctrl = $controller('FooCtrl', {$scope: scope});
79-
expect(ctrl.has('whatever')).toBe(false);
71+
expect($controllerProvider.has('BarCtrl')).toBe(false);
8072
});
8173

8274
it('should allow registration of controllers annotated with arrays', function() {

0 commit comments

Comments
 (0)