summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-11-03 08:56:44 +0000
committerlambda <pleromagit@rogerbraun.net>2017-11-03 08:56:44 +0000
commitfa1f11e8e9c31b0ed2857ca3c3feb78552ed54d0 (patch)
tree558115d281c48d6546376652a110d08ee1e4ff8b /test/notification_test.exs
parent8a1a7191fd9348fb35fc1aa322dd90869c7dfceb (diff)
parentc6b9b777dacef2fce51e43a25e3af9c9fac9a87e (diff)
downloadpleroma-fa1f11e8e9c31b0ed2857ca3c3feb78552ed54d0.tar.gz
pleroma-fa1f11e8e9c31b0ed2857ca3c3feb78552ed54d0.zip
Merge branch 'feature/blocks' into 'develop'
Feature/blocks See merge request pleroma/pleroma!5
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