Sha256: 3c719a8af19dcfad5350634c761f07a4fc66e4bd4adbc9aedf547de947ac4a51
Contents?: true
Size: 615 Bytes
Versions: 2
Compression:
Stored size: 615 Bytes
Contents
require File.expand_path('../support/test_helper', __FILE__) class ListOptionTest < Minitest::Test def test_list_option_reusing_schemas schema_hash = { "$schema" => "http://json-schema.org/draft-04/schema#", "type" => "object", "properties" => { "a" => { "type" => "integer" } } } uri = Addressable::URI.parse('http://example.com/item') schema = JSON::Schema.new(schema_hash, uri) JSON::Validator.add_schema(schema) data = {"a" => 1} assert_valid uri.to_s, data, clear_cache: false data = [{"a" => 1}] assert_valid uri.to_s, data, :list => true 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/list_option_test.rb |
mountapi-0.11.1 | vendor/json-schema/test/list_option_test.rb |