summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index f8d429223..d3d409c68 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -93,7 +93,7 @@ defmodule Pleroma.NotificationTest do
activity = insert(:note_activity)
author = User.get_cached_by_ap_id(activity.data["actor"])
user = insert(:user)
- {:ok, user} = User.block(user, author)
+ {:ok, _user_block} = User.block(user, author)
assert Notification.create_notification(activity, user)
end
@@ -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}"})
@@ -656,7 +659,7 @@ defmodule Pleroma.NotificationTest do
test "it doesn't return notifications for blocked user" do
user = insert(:user)
blocked = insert(:user)
- {:ok, user} = User.block(user, blocked)
+ {:ok, _user_block} = User.block(user, blocked)
{:ok, _activity} = CommonAPI.post(blocked, %{"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}"})
@@ -696,7 +699,7 @@ defmodule Pleroma.NotificationTest do
test "it doesn't return notifications from a blocked user when with_muted is set" do
user = insert(:user)
blocked = insert(:user)
- {:ok, user} = User.block(user, blocked)
+ {:ok, _user_block} = User.block(user, blocked)
{:ok, _activity} = CommonAPI.post(blocked, %{"status" => "hey @#{user.nickname}"})