aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/formSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/directive/formSpec.js')
-rw-r--r--test/ng/directive/formSpec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ng/directive/formSpec.js b/test/ng/directive/formSpec.js
index fb64fdb3..53fd3d90 100644
--- a/test/ng/directive/formSpec.js
+++ b/test/ng/directive/formSpec.js
@@ -137,6 +137,18 @@ describe('form', function() {
});
+ it('should throw an exception if an input has name="hasOwnProperty"', function() {
+ doc = jqLite(
+ '<form name="form">'+
+ '<input name="hasOwnProperty" ng-model="some" />'+
+ '<input name="other" ng-model="someOther" />'+
+ '</form>');
+ expect(function() {
+ $compile(doc)(scope);
+ }).toThrowMinErr('ng', 'badname');
+ });
+
+
describe('preventing default submission', function() {
it('should prevent form submission', function() {