Merge branch 'develop' into gun
[akkoma] / test / web / common_api / common_api_utils_test.exs
index b380d10d89364693e9d2c0cb7bee7fc4e060331f..92ba2b983d9e3f1247f9d2da00c08f83a2cc52fd 100644 (file)
@@ -474,6 +474,13 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
       activity = insert(:note_activity, user: user, note: object)
       Pleroma.Repo.delete(object)
 
+      obj_url = activity.data["object"]
+
+      Tesla.Mock.mock(fn
+        %{method: :get, url: ^obj_url} ->
+          %Tesla.Env{status: 404, body: ""}
+      end)
+
       assert Utils.maybe_notify_mentioned_recipients(["test-test"], activity) == [
                "test-test"
              ]