Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NickNeck committed Jul 27, 2023
1 parent 0f8e312 commit 782de36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions test/json_xema/object_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ defmodule JsonXema.ObjectTest do
reason: %{maxProperties: 3, value: %{a: 1, b: 2, c: 3, d: 4}}
}

assert Exception.message(error) ==
~s|Expected at most 3 properties, got %{a: 1, b: 2, c: 3, d: 4}.|
assert Exception.message(error) =~ ~s|Expected at most 3 properties, got|
end
end

Expand Down
4 changes: 3 additions & 1 deletion test/json_xema/ref_remote_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,11 @@ defmodule JsonXema.RefRemoteTest do
end

test "issue-173" do
assert "test/fixtures/remote/issue-173/root.json"
assert xema = "test/fixtures/remote/issue-173/root.json"
|> File.read!()
|> Jason.decode!()
|> JsonXema.new(loader: Test.FileLoader)

assert xema == %JsonXema{schema: %Xema.Schema{type: true}, refs: %{}}
end
end

0 comments on commit 782de36

Please sign in to comment.