aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/inputSpec.js
diff options
context:
space:
mode:
authorGregory Pike2012-08-31 19:20:01 -0400
committerMisko Hevery2012-09-06 16:06:23 -0700
commitd519953a4b219035587e3fcb2e9cc52e02b408ca (patch)
treecf4e66c0885bce26745000d324db6204cd73b37e /test/ng/directive/inputSpec.js
parent4909d1d39d61d6945a0820a5a7276c1e657ba262 (diff)
downloadangular.js-d519953a4b219035587e3fcb2e9cc52e02b408ca.tar.bz2
feat(ngModel): support ngTrim attribute on input
Diffstat (limited to 'test/ng/directive/inputSpec.js')
-rw-r--r--test/ng/directive/inputSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js
index 3b511011..01669b18 100644
--- a/test/ng/directive/inputSpec.js
+++ b/test/ng/directive/inputSpec.js
@@ -382,6 +382,14 @@ describe('input', function() {
});
+ it('should update the model and not trim the value', function() {
+ compileInput('<input type="text" ng-model="name" name="alias" ng-trim="false" />');
+
+ changeInputValueTo(' a ');
+ expect(scope.name).toEqual(' a ');
+ });
+
+
it('should allow complex reference binding', function() {
compileInput('<input type="text" ng-model="obj[\'abc\'].name"/>');