From 9d566a0cd0225685efb192c195280b6857628d32 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 5 Feb 2010 14:41:45 -0800 Subject: better integer farmater --- test/ValidatorsTest.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ValidatorsTest.js') diff --git a/test/ValidatorsTest.js b/test/ValidatorsTest.js index 22c7f390..f06e0b3a 100644 --- a/test/ValidatorsTest.js +++ b/test/ValidatorsTest.js @@ -19,6 +19,8 @@ ValidatorTest.prototype.testNumber = function() { ValidatorTest.prototype.testInteger = function() { assertEquals(angular.validator.integer("ab"), "Value is not a number."); assertEquals(angular.validator.integer("1.1"), "Value is not a whole number."); + assertEquals(angular.validator.integer("1.0"), "Value is not a whole number."); + assertEquals(angular.validator.integer("1."), "Value is not a whole number."); assertEquals(angular.validator.integer("-1",0), "Value can not be less than 0."); assertEquals(angular.validator.integer("11",0,10), "Value can not be greater than 10."); assertEquals(angular.validator.integer("1"), null); -- cgit v1.2.3