test(backent): fix ActivityPub client mock

This commit is contained in:
setop
2024-08-20 21:43:41 +02:00
parent df6ffee7cf
commit f789fcd2ee
4 changed files with 18 additions and 2 deletions

View File

@@ -62,9 +62,12 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier.UndoTest do
|> Map.put("id", "https://social.tcit.fr/users/tcit")
Mock
|> expect(:call, fn
|> expect(:call, 2, fn
%{method: :get, url: "https://social.tcit.fr/users/tcit"}, _opts ->
{:ok, %Tesla.Env{status: 200, body: actor_data}}
%{method: :post, url: "https://framapiaf.org/inbox"} = args, _opts ->
{:ok, args}
end)
{:ok, %Activity{data: _, local: false}, _} = Transmogrifier.handle_incoming(follow_data)