From 90bf82cf45c1d27b3b758ebce6226113a1303084 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 23 Feb 2021 11:05:41 -0600 Subject: [PATCH] Fix pleroma.user rm mix task test This is not the place to be validating deletes are federated --- test/mix/tasks/pleroma/user_test.exs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/mix/tasks/pleroma/user_test.exs b/test/mix/tasks/pleroma/user_test.exs index a2178bbd1..612dc0280 100644 --- a/test/mix/tasks/pleroma/user_test.exs +++ b/test/mix/tasks/pleroma/user_test.exs @@ -95,17 +95,13 @@ defmodule Mix.Tasks.Pleroma.UserTest do clear_config([:instance, :federating], true) user = insert(:user) - with_mock Pleroma.Web.Federator, - publish: fn _ -> nil end do - Mix.Tasks.Pleroma.User.run(["rm", user.nickname]) - ObanHelpers.perform_all() + Mix.Tasks.Pleroma.User.run(["rm", user.nickname]) - assert_received {:mix_shell, :info, [message]} - assert message =~ " deleted" - assert %{is_active: false} = User.get_by_nickname(user.nickname) + assert [{:ok, job_result}] = ObanHelpers.perform_all() - assert called(Pleroma.Web.Federator.publish(:_)) - end + assert_received {:mix_shell, :info, [message]} + assert message =~ " deleted" + assert %{is_active: false} = User.get_by_nickname(user.nickname) end test "a remote user's create activity is deleted when the object has been pruned" do