diff options
| author | Misko Hevery | 2010-02-04 11:45:38 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-02-04 11:45:38 -0800 |
| commit | 5dd43b85e73ca1708e7fd85094b533b02266a79a (patch) | |
| tree | b302e7351307fc2927d750e469e6afeb8d5343c4 /test/BinderTest.js | |
| parent | 302472f4fa50f995085ebf36b8990bedf3806973 (diff) | |
| download | angular.js-5dd43b85e73ca1708e7fd85094b533b02266a79a.tar.bz2 | |
ng-required treats whitespace as empty
Diffstat (limited to 'test/BinderTest.js')
| -rw-r--r-- | test/BinderTest.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/BinderTest.js b/test/BinderTest.js index 450100e4..a45183a4 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -767,6 +767,14 @@ BinderTest.prototype.testValidateForm = function() { c.binder.updateView(); assertEquals(3, c.scope.get("$invalidWidgets.length")); + c.scope.set('name', ''); + c.binder.updateView(); + assertEquals(3, c.scope.get("$invalidWidgets.length")); + + c.scope.set('name', ' '); + c.binder.updateView(); + assertEquals(3, c.scope.get("$invalidWidgets.length")); + c.scope.set('name', 'abc'); c.binder.updateView(); assertEquals(2, c.scope.get("$invalidWidgets.length")); |
