summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-11-15 21:38:54 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-11-15 21:38:54 +0300
commitc31ddce51ea18f052c1c3ad30a221b77c7a94e71 (patch)
tree12a4d97437762e252bd4b2ad36268cbd89d99ccf /test/web/mastodon_api/views
parent5cf2c7422b006d477498af8d7618a0d6f7659290 (diff)
downloadpleroma-c31ddce51ea18f052c1c3ad30a221b77c7a94e71.tar.gz
pleroma-c31ddce51ea18f052c1c3ad30a221b77c7a94e71.zip
[#1335] Reorganized `users.mutes` as relation to UserMute entity.
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs5
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs4
2 files changed, 6 insertions, 3 deletions
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index c34bf7ba9..f8b74553b 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -191,9 +191,12 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
{:ok, user} = User.follow(user, other_user)
{:ok, other_user} = User.follow(other_user, user)
{:ok, other_user} = User.subscribe(user, other_user)
- {:ok, user} = User.mute(user, other_user, true)
+ {:ok, _user_mute} = User.mute(user, other_user, true)
{:ok, user} = CommonAPI.hide_reblogs(user, other_user)
+ # Refreshing to reflect embedded ap id relation fields (remove once removed)
+ user = refresh_record(user)
+
expected = %{
id: to_string(other_user.id),
following: true,
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index d46ecc646..89b146e1e 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -183,7 +183,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
user = insert(:user)
other_user = insert(:user)
- {:ok, user} = User.mute(user, other_user)
+ {:ok, _user_mute} = User.mute(user, other_user)
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "test"})
status = StatusView.render("show.json", %{activity: activity})
@@ -199,7 +199,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
user = insert(:user)
other_user = insert(:user)
- {:ok, user} = User.mute(user, other_user)
+ {:ok, _user_mute} = User.mute(user, other_user)
{:ok, activity} = CommonAPI.post(other_user, %{"status" => "test"})
status = StatusView.render("show.json", %{activity: activity, for: user})