mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 12:05:46 +08:00
fix(input): Render 0 (number) as 0 (not empty string)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user