aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/controllerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/controllerSpec.js')
-rw-r--r--test/ng/controllerSpec.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ng/controllerSpec.js b/test/ng/controllerSpec.js
index 2a9922c6..4f94402f 100644
--- a/test/ng/controllerSpec.js
+++ b/test/ng/controllerSpec.js
@@ -57,6 +57,13 @@ describe('$controller', function() {
expect(scope.foo).toBe('bar');
expect(ctrl instanceof FooCtrl).toBe(true);
});
+
+
+ it('should throw an exception if a controller is called "hasOwnProperty"', function () {
+ expect(function() {
+ $controllerProvider.register('hasOwnProperty', function($scope) {});
+ }).toThrowMinErr('ng', 'badname', "hasOwnProperty is not a valid controller name");
+ });
});