summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-05-13 08:16:54 +0000
committerlambda <pleromagit@rogerbraun.net>2018-05-13 08:16:54 +0000
commit2d83efa5deeef249494f06c6a0f20cfe5791a8e3 (patch)
tree67fd0dd926cb180be8dc0f0d1d3e9c6860232c5e /test/notification_test.exs
parent853f183fd3b8e782ef0f05e30a0b6b080d2a4ed0 (diff)
parent89603eda9ea51c5bd3c681fce958a4a6b446debe (diff)
downloadpleroma-2d83efa5deeef249494f06c6a0f20cfe5791a8e3.tar.gz
pleroma-2d83efa5deeef249494f06c6a0f20cfe5791a8e3.zip
Merge branch 'no-self-notification' into 'develop'
Do not create notification for yourself Closes #121 See merge request pleroma/pleroma!148
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index 568ad642c..2ca1ac13d 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -33,6 +33,13 @@ defmodule Pleroma.NotificationTest do
assert nil == Notification.create_notification(activity, user)
end
+
+ test "it doesn't create a notification for user if he is the activity author" do
+ activity = insert(:note_activity)
+ author = User.get_by_ap_id(activity.data["actor"])
+
+ assert nil == Notification.create_notification(activity, author)
+ end
end
describe "get notification" do