mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-12 13:56:53 +00:00
19 lines
316 B
Elixir
19 lines
316 B
Elixir
|
defmodule Pleroma.Test.Matchers.XML do
|
||
|
import ExUnit.Assertions
|
||
|
|
||
|
def assert_xml_equals(xml_a, xml_b) do
|
||
|
map_a = XmlToMap.naive_map(xml_a)
|
||
|
map_b = XmlToMap.naive_map(xml_b)
|
||
|
|
||
|
if map_a != map_b do
|
||
|
flunk(~s|Expected XML
|
||
|
#{xml_a}
|
||
|
|
||
|
to equal
|
||
|
|
||
|
#{xml_b}
|
||
|
|)
|
||
|
end
|
||
|
end
|
||
|
end
|