Merge branch 'feature/create-tombstone-instead-of-delete' into 'develop'
[akkoma] / test / web / ostatus / incoming_documents / delete_handling_test.exs
index 43d04dea269d468fff66524c2dfb6400342da891..c8fbff6cc7741e3298185ca551d1dbee0eac1cec 100644 (file)
@@ -14,13 +14,18 @@ defmodule Pleroma.Web.OStatus.DeleteHandlingTest do
 
       {: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"])
+      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, [delete]} = 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 Object.get_by_ap_id(note.data["object"]["id"]).data["type"] == "Tombstone"
       assert Repo.get(Activity, second_note.id)
       assert Object.get_by_ap_id(second_note.data["object"]["id"])