Merge branch 'develop' into issue/1276
[akkoma] / test / web / common_api / common_api_utils_test.exs
index 45fc94522da749bf48dadd1094e5a66ced7be457..d383d1714e172a9ef5125dd320a6d28330134137 100644 (file)
@@ -472,6 +472,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"
              ]