From 782de362b80a148775aeb2326232c8b5982d27ad Mon Sep 17 00:00:00 2001 From: Marcus Kruse Date: Thu, 27 Jul 2023 22:47:08 +0200 Subject: [PATCH] Update tests --- test/json_xema/object_test.exs | 3 +-- test/json_xema/ref_remote_test.exs | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/json_xema/object_test.exs b/test/json_xema/object_test.exs index db92709..c006de2 100644 --- a/test/json_xema/object_test.exs +++ b/test/json_xema/object_test.exs @@ -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 diff --git a/test/json_xema/ref_remote_test.exs b/test/json_xema/ref_remote_test.exs index 88bf6a5..b126623 100644 --- a/test/json_xema/ref_remote_test.exs +++ b/test/json_xema/ref_remote_test.exs @@ -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