diff options
author | Pierrick Brun <brun.pierrick@protonmail.com> | 2018-05-07 20:51:14 +0200 |
---|---|---|
committer | Pierrick Brun <brun.pierrick@protonmail.com> | 2018-05-11 11:31:17 +0200 |
commit | 89603eda9ea51c5bd3c681fce958a4a6b446debe (patch) | |
tree | f2dbc1b84500622ae9532a1aaf106bb59ac78939 /test/notification_test.exs | |
parent | ffe028cd7392404c85ab65eca167a16e85b3f788 (diff) | |
download | pleroma-89603eda9ea51c5bd3c681fce958a4a6b446debe.tar.gz pleroma-89603eda9ea51c5bd3c681fce958a4a6b446debe.zip |
do not create notification for yourself
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 7 |
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 |