aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/compileSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/compileSpec.js')
-rwxr-xr-xtest/ng/compileSpec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js
index 5e28c62b..1e6f6e26 100755
--- a/test/ng/compileSpec.js
+++ b/test/ng/compileSpec.js
@@ -117,6 +117,15 @@ describe('$compile', function() {
expect(log).toEqual('pre1; pre2; post2; post1');
});
});
+
+ it('should throw an exception if a directive is called "hasOwnProperty"', function() {
+ module(function() {
+ expect(function() {
+ directive('hasOwnProperty', function() { });
+ }).toThrowMinErr('ng','badname', "hasOwnProperty is not a valid directive name");
+ });
+ inject(function($compile) {});
+ });
});