From 8fe5581a30661991bd72bcbe61ac5f4772f2fa4b Mon Sep 17 00:00:00 2001
From: Alvaro Cabrera <pateketrueke@gmail.com>
Date: Tue, 5 May 2015 00:10:46 -0500
Subject: [PATCH] Ensure generated format for integers

---
 spec/core/types/integers.json | 12 +++++++++++-
 spec/main-spec.coffee         |  3 +++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/spec/core/types/integers.json b/spec/core/types/integers.json
index d39aa3a4..740f528e 100644
--- a/spec/core/types/integers.json
+++ b/spec/core/types/integers.json
@@ -1,6 +1,6 @@
 [
   {
-    "description": "generated number values",
+    "description": "generated integer values",
     "tests": [
       {
         "description": "should handle minimum",
@@ -8,6 +8,8 @@
           "type": "integer",
           "minimum": 10
         },
+        "hasNot": ".",
+        "type": "number",
         "valid": true
       },
       {
@@ -17,6 +19,8 @@
           "minimum": 20,
           "maximum": 30
         },
+        "hasNot": ".",
+        "type": "number",
         "valid": true
       },
       {
@@ -27,6 +31,8 @@
           "maximum": 50,
           "multipleOf": 6
         },
+        "hasNot": ".",
+        "type": "number",
         "valid": true
       },
       {
@@ -38,6 +44,8 @@
           "multipleOf": 7,
           "exclusiveMinimum": true
         },
+        "hasNot": ".",
+        "type": "number",
         "valid": true
       },
       {
@@ -50,6 +58,8 @@
           "exclusiveMinimum": true,
           "exclusiveMaximum": true
         },
+        "hasNot": ".",
+        "type": "number",
         "valid": true
       },
       {
diff --git a/spec/main-spec.coffee b/spec/main-spec.coffee
index 9a59cae0..7ee94e44 100644
--- a/spec/main-spec.coffee
+++ b/spec/main-spec.coffee
@@ -44,6 +44,9 @@ glob.sync("#{__dirname}/**/*.json").forEach (file) ->
             error = e.message
             throw e unless test.throws
 
+          if test.hasNot
+            expect(sample.toString()).not.toContain test.hasNot
+
           if test.type
             expect(sample).toHaveType test.type
 
-- 
GitLab