Sha256: f716fd2aa65cb5f308e80d9d24833a06d171bbba18f676bb22d845cf56023b5a
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
Feature: Handling data types The data generated needs to have the correct properties or items, including the data type specified Scenario: Strings Given the following JSON schema: """json { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "name": { "type": "string" } } } """ When I run the JSON data generator Then the "name" property of the JSON output should be a String Scenario: Numbers Given the following JSON schema: """json { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "id": { "type": "number" } } } """ When I run the JSON data generator Then the JSON output should be: """json {"id":1} """ Scenario: Booleans Given the following JSON schema: """json { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "admin": { "type": "boolean" } } } """ When I run the JSON data generator Then the JSON output should be: """json {"admin":true} """
Version data entries
6 entries across 6 versions & 1 rubygems