summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/notification_controller_test.exs
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/controllers/notification_controller_test.exs
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/controllers/notification_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/notification_controller_test.exs9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/web/mastodon_api/controllers/notification_controller_test.exs b/test/web/mastodon_api/controllers/notification_controller_test.exs
index fa55a7cf9..75b871a43 100644
--- a/test/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/test/web/mastodon_api/controllers/notification_controller_test.exs
@@ -289,7 +289,10 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, user} = User.mute(user, user2)
+ {:ok, _user_mute} = User.mute(user, user2)
+
+ # Refreshing to reflect embedded ap id relation fields (remove once removed)
+ user = refresh_record(user)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications")
@@ -310,7 +313,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, user} = User.mute(user, user2, false)
+ {:ok, _user_mute} = User.mute(user, user2, false)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications")
@@ -333,7 +336,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, user} = User.mute(user, user2)
+ {:ok, _user_mute} = User.mute(user, user2)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications", %{"with_muted" => "true"})