Skip to content

Commit

Permalink
add a test of json schema pointer including a number of empty strings
Browse files Browse the repository at this point in the history
  • Loading branch information
notEthan committed May 17, 2017
1 parent 57711df commit 80e36d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/json_schema_pointer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def test_evaluate_success
pointer = JSON::Schema::Pointer.new(:fragment, "#/a%2520%20b/c~1d/e%7E0f/0")
assert_equal(1, pointer.evaluate({'a%20 b' => {'c/d' => {'e~f' => [1]}}}))
end
def test_evaluate_empty_strings_success
pointer = JSON::Schema::Pointer.new(:fragment, "#/a///0//")
assert_equal(1, pointer.evaluate({'a' => {'' => {'' => [{'' => {'' => 1}}]}}}))
end
def test_evaluate_fail
assert_raises(JSON::Schema::Pointer::ReferenceError) do
pointer = JSON::Schema::Pointer.new(:fragment, "#/a%2520%20b/c~1d/e%7E0f/0")
Expand Down

0 comments on commit 80e36d3

Please sign in to comment.