akkoma/test/support/matchers/xml.ex

19 lines
316 B
Elixir
Raw Permalink Normal View History

2023-08-07 04:12:14 -06:00
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