Fix deletion not deleting relevant actions.
[akkoma] / test / web / ostatus / incoming_documents / delete_handling_test.exs
index 8cd6e295e9807b0c33cb11cd35e5944c0c842a2b..989c87afa14fd4a6258b198b725243541de19bdf 100644 (file)
@@ -9,12 +9,17 @@ defmodule Pleroma.Web.OStatus.DeleteHandlingTest do
     test "it removes the mentioned activity" do
       note = insert(:note_activity)
       second_note = insert(:note_activity)
+      user = insert(:user)
+      object = Object.get_by_ap_id(note.data["object"]["id"])
+
+      {:ok, like, object} = Pleroma.Web.ActivityPub.ActivityPub.like(user, object)
 
       incoming = File.read!("test/fixtures/delete.xml")
       |> String.replace("tag:mastodon.sdf.org,2017-06-10:objectId=310513:objectType=Status", note.data["object"]["id"])
       {:ok, []} = OStatus.handle_incoming(incoming)
 
       refute Repo.get(Activity, note.id)
+      refute Repo.get(Activity, like.id)
       refute Object.get_by_ap_id(note.data["object"]["id"])
       assert Repo.get(Activity, second_note.id)
       assert Object.get_by_ap_id(second_note.data["object"]["id"])