diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-15 21:38:54 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-11-15 21:38:54 +0300 |
commit | c31ddce51ea18f052c1c3ad30a221b77c7a94e71 (patch) | |
tree | 12a4d97437762e252bd4b2ad36268cbd89d99ccf /test/notification_test.exs | |
parent | 5cf2c7422b006d477498af8d7618a0d6f7659290 (diff) | |
download | pleroma-c31ddce51ea18f052c1c3ad30a221b77c7a94e71.tar.gz |
[#1335] Reorganized `users.mutes` as relation to UserMute entity.
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index 5388214ba..d3d409c68 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -112,7 +112,7 @@ defmodule Pleroma.NotificationTest do muter = insert(:user) muted = insert(:user) - {:ok, muter} = User.mute(muter, muted, false) + {:ok, _user_mute} = User.mute(muter, muted, false) {:ok, activity} = CommonAPI.post(muted, %{"status" => "Hi @#{muter.nickname}"}) @@ -636,7 +636,7 @@ defmodule Pleroma.NotificationTest do test "it returns notifications for muted user without notifications" do user = insert(:user) muted = insert(:user) - {:ok, user} = User.mute(user, muted, false) + {:ok, _user_mute} = User.mute(user, muted, false) {:ok, _activity} = CommonAPI.post(muted, %{"status" => "hey @#{user.nickname}"}) @@ -646,7 +646,10 @@ defmodule Pleroma.NotificationTest do test "it doesn't return notifications for muted user with notifications" do user = insert(:user) muted = insert(:user) - {:ok, user} = User.mute(user, muted) + {:ok, _user_mute} = User.mute(user, muted) + + # Refreshing to reflect embedded ap id relation fields (remove once removed) + user = refresh_record(user) {:ok, _activity} = CommonAPI.post(muted, %{"status" => "hey @#{user.nickname}"}) @@ -686,7 +689,7 @@ defmodule Pleroma.NotificationTest do test "it returns notifications from a muted user when with_muted is set" do user = insert(:user) muted = insert(:user) - {:ok, user} = User.mute(user, muted) + {:ok, _user_mute} = User.mute(user, muted) {:ok, _activity} = CommonAPI.post(muted, %{"status" => "hey @#{user.nickname}"}) |