Sha256: 9676724dcb88c13a56b6b56ba8f5f6d25475e3704165c84b9cd9e6184fc7bd8d

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

require File.expand_path('../support/test_helper', __FILE__)

class MinItemsTest < Minitest::Test
  def test_minitems_nils
    schema = {
      "type" => "array",
      "minItems" => 1,
      "items" => { "type" => "object" }
    }

    errors = JSON::Validator.fully_validate(schema, [nil])
    assert_equal(errors.length, 1)
    assert(errors[0] !~ /minimum/)
    assert(errors[0] =~ /null/)
  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/bundler/gems/json-schema-2253a5ee6679/test/min_items_test.rb
mountapi-0.11.1 vendor/json-schema/test/min_items_test.rb