Skip to content

Commit 29117b8

Browse files
committed
also test that string/string conflicts result in the second string being chosen
1 parent 7baa361 commit 29117b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/utils/include_tree_test.exs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,11 @@ defmodule JSONAPI.IncludeTreeTest do
1313
# the other direction
1414
assert [hi: "there", other: "thing"] = deep_merge([hi: [hello: "there"]], other: "thing", hi: "there")
1515
end
16+
17+
test "deep_merge/2 handles string/string conflict by choosing second value" do
18+
# one direction
19+
assert [hi: "there"] = deep_merge([hi: "hello"], hi: "there")
20+
# the other direction
21+
assert [hi: "hello"] = deep_merge([hi: "there"], hi: "hello")
22+
end
1623
end

0 commit comments

Comments
 (0)