summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/notification_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-11-19 23:22:10 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-11-19 23:22:10 +0300
commitba5cc3016514080b4bf7eaefd3e25936c0e222ba (patch)
tree799e826ee738487fcf758fd966cff263f8b491db /test/web/mastodon_api/controllers/notification_controller_test.exs
parent3aaf3aa2c24c6b38d7e49e4861c1294c285db49b (diff)
downloadpleroma-ba5cc3016514080b4bf7eaefd3e25936c0e222ba.tar.gz
pleroma-ba5cc3016514080b4bf7eaefd3e25936c0e222ba.zip
[#1335] Implemented notification mutes and reblog mutes as UserRelationships. User to UserRelationship relations and functions refactoring.
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, 3 insertions, 6 deletions
diff --git a/test/web/mastodon_api/controllers/notification_controller_test.exs b/test/web/mastodon_api/controllers/notification_controller_test.exs
index 75b871a43..00a85169e 100644
--- a/test/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/test/web/mastodon_api/controllers/notification_controller_test.exs
@@ -289,10 +289,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, _user_mute} = User.mute(user, user2)
-
- # Refreshing to reflect embedded ap id relation fields (remove once removed)
- user = refresh_record(user)
+ {:ok, _user_relationships} = User.mute(user, user2)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications")
@@ -313,7 +310,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, _user_mute} = User.mute(user, user2, false)
+ {:ok, _user_relationships} = User.mute(user, user2, false)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications")
@@ -336,7 +333,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
assert length(json_response(conn, 200)) == 1
- {:ok, _user_mute} = User.mute(user, user2)
+ {:ok, _user_relationships} = User.mute(user, user2)
conn = assign(build_conn(), :user, user)
conn = get(conn, "/api/v1/notifications", %{"with_muted" => "true"})