summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/activity_pub/side_effects_test.exs4
-rw-r--r--test/pleroma/web/activity_pub/utils_test.exs6
-rw-r--r--test/pleroma/web/common_api_test.exs6
-rw-r--r--test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs2
-rw-r--r--test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs2
5 files changed, 10 insertions, 10 deletions
diff --git a/test/pleroma/web/activity_pub/side_effects_test.exs b/test/pleroma/web/activity_pub/side_effects_test.exs
index 8c115cedd..417e47487 100644
--- a/test/pleroma/web/activity_pub/side_effects_test.exs
+++ b/test/pleroma/web/activity_pub/side_effects_test.exs
@@ -519,7 +519,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
{:ok, like} = CommonAPI.favorite(post.id, user)
{:ok, reaction} = CommonAPI.react_with_emoji(post.id, user, "👍")
{:ok, announce} = CommonAPI.repeat(post.id, user)
- {:ok, block} = CommonAPI.block(user, poster)
+ {:ok, block} = CommonAPI.block(poster, user)
{:ok, undo_data, _meta} = Builder.undo(user, like)
{:ok, like_undo, _meta} = ActivityPub.persist(undo_data, local: true)
@@ -965,7 +965,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
group: group,
poster: poster
} do
- {:ok, _} = CommonAPI.block(group, poster)
+ {:ok, _} = CommonAPI.block(poster, group)
create_activity_data = make_create.([group])
{:ok, create_activity, _meta} = ActivityPub.persist(create_activity_data, local: false)
diff --git a/test/pleroma/web/activity_pub/utils_test.exs b/test/pleroma/web/activity_pub/utils_test.exs
index 833c7fbf3..b7d6b8ec7 100644
--- a/test/pleroma/web/activity_pub/utils_test.exs
+++ b/test/pleroma/web/activity_pub/utils_test.exs
@@ -382,9 +382,9 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
user1 = insert(:user)
user2 = insert(:user)
- assert {:ok, %Activity{} = _} = CommonAPI.block(user1, user2)
- assert {:ok, %Activity{} = _} = CommonAPI.block(user1, user2)
- assert {:ok, %Activity{} = activity} = CommonAPI.block(user1, user2)
+ assert {:ok, %Activity{} = _} = CommonAPI.block(user2, user1)
+ assert {:ok, %Activity{} = _} = CommonAPI.block(user2, user1)
+ assert {:ok, %Activity{} = activity} = CommonAPI.block(user2, user1)
assert Utils.fetch_latest_block(user1, user2) == activity
end
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 381a8f37b..06c912bd0 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -95,7 +95,7 @@ defmodule Pleroma.Web.CommonAPITest do
assert User.get_follow_state(blocker, blocked) == :follow_accept
refute is_nil(Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(blocker, blocked))
- assert {:ok, block} = CommonAPI.block(blocker, blocked)
+ assert {:ok, block} = CommonAPI.block(blocked, blocker)
assert block.local
assert User.blocks?(blocker, blocked)
@@ -120,7 +120,7 @@ defmodule Pleroma.Web.CommonAPITest do
with_mock Pleroma.Web.Federator,
publish: fn _ -> nil end do
- assert {:ok, block} = CommonAPI.block(blocker, blocked)
+ assert {:ok, block} = CommonAPI.block(blocked, blocker)
assert block.local
assert User.blocks?(blocker, blocked)
@@ -1914,7 +1914,7 @@ defmodule Pleroma.Web.CommonAPITest do
end
test "it does not boost if group is blocking poster", %{poster: poster, group: group} do
- {:ok, _} = CommonAPI.block(group, poster)
+ {:ok, _} = CommonAPI.block(poster, group)
{:ok, post} = CommonAPI.post(poster, %{status: "hey @#{group.nickname}"})
announces = get_announces_of_object(post.object)
diff --git a/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
index c3a2a4e25..8e2890c7e 100644
--- a/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
@@ -148,7 +148,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
%{user: user, conn: conn} = oauth_access(["read:notifications"])
blocker = insert(:user)
- {:ok, _} = CommonAPI.block(blocker, user)
+ {:ok, _} = CommonAPI.block(user, blocker)
{:ok, activity} = CommonAPI.post(blocker, %{status: "hi @#{user.nickname}"})
{:ok, [_notification]} = Notification.create_notifications(activity)
diff --git a/test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs
index c0f3d5a2a..687b23c83 100644
--- a/test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs
@@ -47,7 +47,7 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do
test "returns v2 suggestions excluding blocked accounts", %{conn: conn, user: blocker} do
blocked = insert(:user, is_suggested: true)
- {:ok, _} = CommonAPI.block(blocker, blocked)
+ {:ok, _} = CommonAPI.block(blocked, blocker)
res =
conn