summaryrefslogtreecommitdiff
path: root/test/web/activity_pub/side_effects_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/activity_pub/side_effects_test.exs')
-rw-r--r--test/web/activity_pub/side_effects_test.exs19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/web/activity_pub/side_effects_test.exs b/test/web/activity_pub/side_effects_test.exs
index 4a08eb7ee..9efbaad04 100644
--- a/test/web/activity_pub/side_effects_test.exs
+++ b/test/web/activity_pub/side_effects_test.exs
@@ -19,8 +19,9 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
alias Pleroma.Web.ActivityPub.SideEffects
alias Pleroma.Web.CommonAPI
- import Pleroma.Factory
+ import ExUnit.CaptureLog
import Mock
+ import Pleroma.Factory
describe "handle_after_transaction" do
test "it streams out notifications and streams" do
@@ -221,6 +222,22 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
assert User.get_cached_by_ap_id(user.ap_id).deactivated
end
+
+ test "it logs issues with objects deletion", %{
+ delete: delete,
+ object: object
+ } do
+ {:ok, object} =
+ object
+ |> Object.change(%{data: Map.delete(object.data, "actor")})
+ |> Repo.update()
+
+ Object.invalid_object_cache(object)
+
+ assert capture_log(fn ->
+ {:error, :no_object_actor} = SideEffects.handle(delete)
+ end) =~ "object doesn't have an actor"
+ end
end
describe "EmojiReact objects" do