alias Pleroma.Web.Websub.WebsubClientSubscription
import Pleroma.Factory
+ import ExUnit.CaptureLog
alias Pleroma.Web.CommonAPI
setup_all do
data
|> Map.put("object", object)
- {:ok, _returned_activity} = Transmogrifier.handle_incoming(data)
+ assert capture_log(fn ->
+ {:ok, _returned_activity} = Transmogrifier.handle_incoming(data)
+ end) =~ "[error] Couldn't fetch \"\"https://404.site/whatever\"\", error: nil"
end
test "it works for incoming notices" do
data
|> Map.put("object", object)
- :error = Transmogrifier.handle_incoming(data)
+ assert capture_log(fn ->
+ :error = Transmogrifier.handle_incoming(data)
+ end) =~
+ "[error] Could not decode user at fetch http://mastodon.example.org/users/gargron, {:error, {:error, :nxdomain}}"
assert Activity.get_by_id(activity.id)
end