TransmogrifierTest: Capture the log

This commit is contained in:
Lain Soykaf 2023-12-10 17:06:13 +04:00
parent 221f18dc33
commit 075222525c
1 changed files with 5 additions and 4 deletions

View File

@ -128,10 +128,11 @@ test "it keeps link tags" do
message = File.read!("test/fixtures/fep-e232.json") |> Jason.decode!() message = File.read!("test/fixtures/fep-e232.json") |> Jason.decode!()
assert {:ok, activity} = Transmogrifier.handle_incoming(message) assert capture_log(fn ->
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
object = Object.normalize(activity) object = Object.normalize(activity)
assert [%{"type" => "Mention"}, %{"type" => "Link"}] = object.data["tag"] assert [%{"type" => "Mention"}, %{"type" => "Link"}] = object.data["tag"]
end) =~ "Error while fetching"
end end
test "it accepts quote posts" do test "it accepts quote posts" do