Skip to content

Commit a1b2f6a

Browse files
committed
Test the logical equivalence of dumped schema.json
1 parent 812eff7 commit a1b2f6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/graphql/rake_task_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
end
3535
dumped_json = File.read("./schema.json")
3636
expected_json = JSON.pretty_generate(RakeTaskSchema.execute(GraphQL::Introspection::INTROSPECTION_QUERY))
37-
assert_equal(expected_json, dumped_json)
37+
38+
# Test that that JSON is logically equivalent, not serialized the same
39+
assert_equal(JSON.parse(expected_json), JSON.parse(dumped_json))
3840

3941
dumped_idl = File.read("./schema.graphql")
4042
expected_idl = rake_task_schema_defn.chomp

0 commit comments

Comments
 (0)