Various testing fixes in relation to user deletion.
authorlain <lain@soykaf.club>
Sun, 3 May 2020 11:01:19 +0000 (13:01 +0200)
committerlain <lain@soykaf.club>
Sun, 3 May 2020 11:01:19 +0000 (13:01 +0200)
test/web/activity_pub/side_effects_test.exs
test/web/activity_pub/transmogrifier/delete_handling_test.exs
test/web/admin_api/admin_api_controller_test.exs

index ce34eed4c641edf474f7b257a92f4d8e89464dc1..a9598d7b36ecbdc2c21507c177fd7aa2a4b52710 100644 (file)
@@ -68,7 +68,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
       {:ok, _delete, _} = SideEffects.handle(delete)
       ObanHelpers.perform_all()
 
-      refute User.get_cached_by_ap_id(user.ap_id)
+      assert User.get_cached_by_ap_id(user.ap_id).deactivated
     end
   end
 
index c141e25bc931cb0b59ea7ae31e6823f67e923ec5..f235a8e633ae7e8b656a67a3654ad3cce90cf2f6 100644 (file)
@@ -68,7 +68,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.DeleteHandlingTest do
     {:ok, _} = Transmogrifier.handle_incoming(data)
     ObanHelpers.perform_all()
 
-    refute User.get_cached_by_ap_id(ap_id)
+    assert User.get_cached_by_ap_id(ap_id).deactivated
   end
 
   test "it fails for incoming user deletes with spoofed origin" do
index bf054a12e3b488aa084208fb3627f6241946ec52..0daf29ffb92e5ee14f2bec846006d2047ae59ac9 100644 (file)
@@ -156,7 +156,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
 
         ObanHelpers.perform_all()
 
-        refute User.get_by_nickname(user.nickname)
+        assert User.get_by_nickname(user.nickname).deactivated
 
         log_entry = Repo.one(ModerationLog)