Sha256: 28619e07ad6edff0ddf7189c08138c68799330457fb2914ac2516eda74739490

Contents?: true

Size: 1.29 KB

Versions: 4

Compression:

Stored size: 1.29 KB

Contents

Feature: String constraints
  Scenario: Maximum length is short
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 2
          }
        }
      }
      """
    When I run the JSON data generator
    Then the output should match the schema

  Scenario: Minimum length is long
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 8
          }
        }
      }
      """
    When I run the JSON data generator
    Then the output should match the schema

  Scenario: Possible values given
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "foo",
              "bar",
              "baz"
            ]
          }
        }
      }
      """
    When I run the JSON data generator
    Then the output should match the schema

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
json_test_data-1.1.0 features/string_constraints.feature
json_test_data-1.0.0 features/string_constraints.feature
json_test_data-0.9.0 features/string_constraints.feature
json_test_data-0.8.0 features/string_constraints.feature