diff options
author | feld <feld@feld.me> | 2021-02-08 16:43:04 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2021-02-08 16:43:04 +0000 |
commit | 85cb122986087062a192c31bc517f2698239819c (patch) | |
tree | 9f94d0bbf7bf8f68c272b43a779e49a4892e55b6 /test | |
parent | 4dbb08a19f57e720e299608ebeb4387d37c55e99 (diff) | |
parent | 8babd796da46975c2d976cf87dad844c13e8a69e (diff) | |
download | pleroma-85cb122986087062a192c31bc517f2698239819c.tar.gz |
Merge branch 'develop' into 'docs/improve-mailer-settings-desc'
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/notification_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pleroma/notification_test.exs b/test/pleroma/notification_test.exs index 0c6ebfb76..948587292 100644 --- a/test/pleroma/notification_test.exs +++ b/test/pleroma/notification_test.exs @@ -45,6 +45,20 @@ defmodule Pleroma.NotificationTest do assert notification.type == "pleroma:report" end + test "suppresses notification to reporter if reporter is an admin" do + reporting_admin = insert(:user, is_admin: true) + reported_user = insert(:user) + other_admin = insert(:user, is_admin: true) + + {:ok, activity} = CommonAPI.report(reporting_admin, %{account_id: reported_user.id}) + + {:ok, [notification]} = Notification.create_notifications(activity) + + refute notification.user_id == reporting_admin.id + assert notification.user_id == other_admin.id + assert notification.type == "pleroma:report" + end + test "creates a notification for an emoji reaction" do user = insert(:user) other_user = insert(:user) |