aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/selectSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/directive/selectSpec.js')
-rw-r--r--test/ng/directive/selectSpec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js
index 584fe614..85acba19 100644
--- a/test/ng/directive/selectSpec.js
+++ b/test/ng/directive/selectSpec.js
@@ -1247,5 +1247,15 @@ describe('select', function() {
expect(element.find('span').text()).toBe('success');
dealoc(element);
}));
+
+ it('should throw an exception if an option value interpolates to "hasOwnProperty"', function() {
+ scope.hasOwnPropertyOption = "hasOwnProperty";
+ expect(function() {
+ compile('<select ng-model="x">'+
+ '<option>{{hasOwnPropertyOption}}</option>'+
+ '</select>');
+ }).toThrowMinErr('ng','badname', 'hasOwnProperty is not a valid "option value" name');
+ });
+
});
});