From 515726b3865aa8574d3950b7e4b80a8cc937a69f Mon Sep 17 00:00:00 2001 From: HelderSepu Date: Sun, 24 Sep 2017 15:45:42 -0400 Subject: [PATCH] Add test for negative num Testing valid negative number with min and max --- test/core/utils.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/core/utils.js b/test/core/utils.js index 4740e35d..2056fb29 100644 --- a/test/core/utils.js +++ b/test/core/utils.js @@ -524,6 +524,17 @@ describe("utils", function() { }) result = validateParam( param, false ) expect( result ).toEqual( [] ) + + // valid negative number with min and max + param = fromJS({ + required: true, + type: "number", + value: -10, + minimum: -50, + maximum: -5 + }) + result = validateParam( param, false ) + expect( result ).toEqual( [] ) }) it("validates optional numbers", function() {