diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-10-23 17:22:42 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-10-23 17:22:42 +0300 |
commit | 8cc809e44e3a899f93061c4c5f68d9736d79d79e (patch) | |
tree | 8193991e2a2b705a60d847a626d22abaf756d7f1 /test/notification_test.exs | |
parent | 11cd9944258bfc2123b821b21321e12097d0f19b (diff) | |
parent | 54077677eaad44ea355c7f0db7ea5e94183d5a30 (diff) | |
download | pleroma-8cc809e44e3a899f93061c4c5f68d9736d79d79e.tar.gz |
Merge remote-tracking branch 'remotes/upstream/develop' into 1304-user-info-deprecation
# Conflicts:
# lib/pleroma/notification.ex
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs index ddd7ae307..f8d429223 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -683,7 +683,7 @@ defmodule Pleroma.NotificationTest do assert Notification.for_user(user) == [] end - test "it returns notifications for muted user with notifications and with_muted parameter" 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) @@ -693,27 +693,27 @@ defmodule Pleroma.NotificationTest do assert length(Notification.for_user(user, %{with_muted: true})) == 1 end - test "it returns notifications for blocked user and with_muted parameter" 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, _activity} = CommonAPI.post(blocked, %{"status" => "hey @#{user.nickname}"}) - assert length(Notification.for_user(user, %{with_muted: true})) == 1 + assert length(Notification.for_user(user, %{with_muted: true})) == 0 end - test "it returns notificatitons for blocked domain and with_muted parameter" do + test "it doesn't return notifications from a domain-blocked user when with_muted is set" do user = insert(:user) blocked = insert(:user, ap_id: "http://some-domain.com") {:ok, user} = User.block_domain(user, "some-domain.com") {:ok, _activity} = CommonAPI.post(blocked, %{"status" => "hey @#{user.nickname}"}) - assert length(Notification.for_user(user, %{with_muted: true})) == 1 + assert length(Notification.for_user(user, %{with_muted: true})) == 0 end - test "it returns notifications for muted thread with_muted parameter" do + test "it returns notifications from muted threads when with_muted is set" do user = insert(:user) another_user = insert(:user) |