aboutsummaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-11-10 16:30:21 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-11-10 16:30:21 +0300
commit3db988250bcd279f20bd1742ca454aa187d89368 (patch)
tree6ea77632f57f8e35de46c5416374dd86d6bca784 /test/web/mastodon_api
parent3a1aaadc18372fb8c76fa72cd20ed65dd85b2326 (diff)
downloadpleroma-3db988250bcd279f20bd1742ca454aa187d89368.tar.gz
[#1335] User: refactored :blocks field into :blocked_users relation.
Introduced UserBlock.
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs2
-rw-r--r--test/web/mastodon_api/controllers/status_controller_test.exs4
-rw-r--r--test/web/mastodon_api/controllers/timeline_controller_test.exs2
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs6
4 files changed, 7 insertions, 7 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs
index 8fc2d9300..b98d9c8e3 100644
--- a/test/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller_test.exs
@@ -883,7 +883,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
user = insert(:user)
other_user = insert(:user)
- {:ok, user} = User.block(user, other_user)
+ {:ok, _user_block} = User.block(user, other_user)
conn =
conn
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs
index a96fd860b..e8a1054ac 100644
--- a/test/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/web/mastodon_api/controllers/status_controller_test.exs
@@ -1108,7 +1108,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
activity: activity
} do
other_user = insert(:user)
- {:ok, user} = User.block(user, other_user)
+ {:ok, _user_block} = User.block(user, other_user)
{:ok, _, _} = CommonAPI.favorite(activity.id, other_user)
@@ -1205,7 +1205,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
activity: activity
} do
other_user = insert(:user)
- {:ok, user} = User.block(user, other_user)
+ {:ok, _user_block} = User.block(user, other_user)
{:ok, _, _} = CommonAPI.repeat(activity.id, other_user)
diff --git a/test/web/mastodon_api/controllers/timeline_controller_test.exs b/test/web/mastodon_api/controllers/timeline_controller_test.exs
index 61b6cea75..524529d1f 100644
--- a/test/web/mastodon_api/controllers/timeline_controller_test.exs
+++ b/test/web/mastodon_api/controllers/timeline_controller_test.exs
@@ -194,7 +194,7 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do
blocker = insert(:user)
blocked = insert(:user)
user = insert(:user)
- {:ok, blocker} = User.block(blocker, blocked)
+ {:ok, _user_block} = User.block(blocker, blocked)
{:ok, _blocked_direct} =
CommonAPI.post(blocked, %{
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index af88841ed..c34bf7ba9 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -219,8 +219,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
{:ok, user} = User.follow(user, other_user)
{:ok, other_user} = User.subscribe(user, other_user)
- {:ok, user} = User.block(user, other_user)
- {:ok, other_user} = User.block(other_user, user)
+ {:ok, _user_block} = User.block(user, other_user)
+ {:ok, _user_block} = User.block(other_user, user)
expected = %{
id: to_string(other_user.id),
@@ -291,7 +291,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
other_user = insert(:user)
{:ok, other_user} = User.follow(other_user, user)
- {:ok, other_user} = User.block(other_user, user)
+ {:ok, _user_block} = User.block(other_user, user)
{:ok, _} = User.follow(insert(:user), user)
expected = %{