diff options
| author | Vojta Jina | 2012-02-25 22:38:18 -0800 |
|---|---|---|
| committer | Vojta Jina | 2012-02-28 18:22:41 -0800 |
| commit | e7d610681114d278b2127757c1d1a65981bc4dc1 (patch) | |
| tree | fb1187190a249bb79f95c6bd4a9f2c924521bc25 /test/widget/inputSpec.js | |
| parent | c4c60c25b494afe282dd1a86a030fbc2c63639aa (diff) | |
| download | angular.js-e7d610681114d278b2127757c1d1a65981bc4dc1.tar.bz2 | |
fix(input): Render 0 (number) as 0 (not empty string)
Diffstat (limited to 'test/widget/inputSpec.js')
| -rw-r--r-- | test/widget/inputSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/widget/inputSpec.js b/test/widget/inputSpec.js index d8e88d2b..e4df4fa5 100644 --- a/test/widget/inputSpec.js +++ b/test/widget/inputSpec.js @@ -334,6 +334,16 @@ describe('input', function() { }); + it('should render 0 even if it is a number', function() { + compileInput('<input type="text" ng:model="value" />'); + scope.$apply(function() { + scope.value = 0; + }); + + expect(inputElm.val()).toBe('0'); + }); + + describe('pattern', function() { it('should validate in-lined pattern', function() { |
