From: lain Date: Sun, 3 May 2020 10:55:29 +0000 (+0200) Subject: Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/delete... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=6fb96f64c13597bcf8d10f30442ac61610cec58e;p=akkoma Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/delete-validator --- 6fb96f64c13597bcf8d10f30442ac61610cec58e diff --cc test/tasks/user_test.exs index ab56f07c1,0f6ffb2b1..e0fee7290 --- a/test/tasks/user_test.exs +++ b/test/tasks/user_test.exs @@@ -90,17 -87,12 +90,17 @@@ defmodule Mix.Tasks.Pleroma.UserTest d test "user is deleted" do user = insert(:user) - Mix.Tasks.Pleroma.User.run(["rm", user.nickname]) + with_mock Pleroma.Web.Federator, + publish: fn _ -> nil end do + Mix.Tasks.Pleroma.User.run(["rm", user.nickname]) + ObanHelpers.perform_all() - assert_received {:mix_shell, :info, [message]} - assert message =~ " deleted" + assert_received {:mix_shell, :info, [message]} + assert message =~ " deleted" - refute User.get_by_nickname(user.nickname) ++ assert %{deactivated: true} = User.get_by_nickname(user.nickname) - assert %{deactivated: true} = User.get_by_nickname(user.nickname) + assert called(Pleroma.Web.Federator.publish(:_)) + end end test "no user to delete" do