summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-11-05 12:12:19 +0100
committerRoger Braun <roger@rogerbraun.net>2017-11-05 12:12:19 +0100
commit7252f6b054dfdfac1f9bac77c442c5a1ebd898af (patch)
tree4cc9941c82ed2b2151b3ef2518dfe440c5c17fe5 /test/notification_test.exs
parent046bee34d3b19c046dba59c1d6cb08548f978859 (diff)
parentfa1f11e8e9c31b0ed2857ca3c3feb78552ed54d0 (diff)
downloadpleroma-7252f6b054dfdfac1f9bac77c442c5a1ebd898af.tar.gz
pleroma-7252f6b054dfdfac1f9bac77c442c5a1ebd898af.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index f50b3cb24..77fdb532f 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -20,4 +20,15 @@ defmodule Pleroma.NotificationTest do
assert other_notification.activity_id == activity.id
end
end
+
+ describe "create_notification" do
+ test "it doesn't create a notification for user if the user blocks the activity author" do
+ activity = insert(:note_activity)
+ author = User.get_by_ap_id(activity.data["actor"])
+ user = insert(:user)
+ {:ok, user} = User.block(user, author)
+
+ assert nil == Notification.create_notification(activity, user)
+ end
+ end
end