diff options
author | Mark Felder <feld@feld.me> | 2024-07-22 18:23:13 -0400 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-07-22 18:25:37 -0400 |
commit | 8127e0d8cce9fa8fb62f6699fdee1bed466a6fb6 (patch) | |
tree | b6a6df81d20b54f34a854a2e6b4a7601bfe85df3 /test | |
parent | 4601473aaf65cfc5696e17069014a92750f1560d (diff) | |
download | pleroma-8127e0d8cce9fa8fb62f6699fdee1bed466a6fb6.tar.gz pleroma-8127e0d8cce9fa8fb62f6699fdee1bed466a6fb6.zip |
Fix order of args for thread_muted?/2
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/user_test.exs | 2 | ||||
-rw-r--r-- | test/pleroma/web/common_api_test.exs | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs index 2dc1b839d..f2a315508 100644 --- a/test/pleroma/user_test.exs +++ b/test/pleroma/user_test.exs @@ -1526,7 +1526,7 @@ defmodule Pleroma.UserTest do assert [activity] == ActivityPub.fetch_public_activities(%{}) |> Repo.preload(:bookmark) - assert [%{activity | thread_muted?: CommonAPI.thread_muted?(user2, activity)}] == + assert [%{activity | thread_muted?: CommonAPI.thread_muted?(activity, user2)}] == ActivityPub.fetch_activities([user2.ap_id | User.following(user2)], %{ user: user2 }) diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 7c92084bc..cc4482efe 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -1173,7 +1173,7 @@ defmodule Pleroma.Web.CommonAPITest do end) {:ok, _} = CommonAPI.add_mute(activity, author) - assert CommonAPI.thread_muted?(author, activity) + assert CommonAPI.thread_muted?(activity, author) assert Repo.aggregate( from(n in Notification, where: n.seen == false and n.user_id == ^friend1.id), @@ -1198,12 +1198,12 @@ defmodule Pleroma.Web.CommonAPITest do test "add mute", %{user: user, activity: activity} do {:ok, _} = CommonAPI.add_mute(activity, user) - assert CommonAPI.thread_muted?(user, activity) + assert CommonAPI.thread_muted?(activity, user) end test "add expiring mute", %{user: user, activity: activity} do {:ok, _} = CommonAPI.add_mute(activity, user, %{expires_in: 60}) - assert CommonAPI.thread_muted?(user, activity) + assert CommonAPI.thread_muted?(activity, user) worker = Pleroma.Workers.MuteExpireWorker args = %{"op" => "unmute_conversation", "user_id" => user.id, "activity_id" => activity.id} @@ -1214,19 +1214,19 @@ defmodule Pleroma.Web.CommonAPITest do ) assert :ok = perform_job(worker, args) - refute CommonAPI.thread_muted?(user, activity) + refute CommonAPI.thread_muted?(activity, user) end test "remove mute", %{user: user, activity: activity} do CommonAPI.add_mute(activity, user) {:ok, _} = CommonAPI.remove_mute(activity, user) - refute CommonAPI.thread_muted?(user, activity) + refute CommonAPI.thread_muted?(activity, user) end test "remove mute by ids", %{user: user, activity: activity} do CommonAPI.add_mute(activity, user) {:ok, _} = CommonAPI.remove_mute(activity.id, user.id) - refute CommonAPI.thread_muted?(user, activity) + refute CommonAPI.thread_muted?(activity, user) end test "check that mutes can't be duplicate", %{user: user, activity: activity} do |