From e7d610681114d278b2127757c1d1a65981bc4dc1 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 25 Feb 2012 22:38:18 -0800 Subject: fix(input): Render 0 (number) as 0 (not empty string) --- test/widget/inputSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/widget/inputSpec.js') 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(''); + scope.$apply(function() { + scope.value = 0; + }); + + expect(inputElm.val()).toBe('0'); + }); + + describe('pattern', function() { it('should validate in-lined pattern', function() { -- cgit v1.2.3