X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Ftransmogrifier%2Fdelete_handling_test.exs;h=b7160bf589acb9f9f79afc2228e5aa53f22fe9cb;hb=e854c35e652ce51821116cc7032099cd5534f7a6;hp=cffaa7c441437347b4a6ca993b750119d6b6d2e0;hpb=ddf23148364657b9eaa7cce463b7eafd8e98214d;p=akkoma
diff --git a/test/pleroma/web/activity_pub/transmogrifier/delete_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/delete_handling_test.exs
index cffaa7c44..b7160bf58 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/delete_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/delete_handling_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
@@ -40,7 +40,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
assert actor == deleting_user.ap_id
# Objects are replaced by a tombstone object.
- object = Object.normalize(activity.data["object"])
+ object = Object.normalize(activity.data["object"], fetch: false)
assert object.data["type"] == "Tombstone"
end
@@ -48,9 +48,10 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
activity = insert(:note_activity)
{:ok, object} =
- Object.normalize(activity.data["object"])
+ Object.normalize(activity.data["object"], fetch: false)
|> Repo.delete()
+ # TODO: mock cachex
Cachex.del(:object_cache, "object:#{object.data["id"]}")
deleting_user = insert(:user)
@@ -96,7 +97,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
{:ok, _} = Transmogrifier.handle_incoming(data)
ObanHelpers.perform_all()
- assert User.get_cached_by_ap_id(ap_id).deactivated
+ refute User.get_cached_by_ap_id(ap_id).is_active
end
test "it fails for incoming user deletes with spoofed origin" do