summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-01-23 02:12:03 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-01-23 02:12:03 +0000
commitdddebee047efc4ab1dff6565bef32954695846a7 (patch)
tree550cf393f8406919e70e1b3aa5fa67ff365b57b8 /test/notification_test.exs
parent73e6bbbe8973d81688e0916e616cd4726ad659c2 (diff)
parent002146d2979afcebe1b3d0c720eb011aa9dbebd0 (diff)
downloadpleroma-dddebee047efc4ab1dff6565bef32954695846a7.tar.gz
pleroma-dddebee047efc4ab1dff6565bef32954695846a7.zip
Merge branch 'emoji-notifications' into 'develop'
Emoji notifications See merge request pleroma/pleroma!2130
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index 9a1c2f2b5..04bf5b41a 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -15,6 +15,18 @@ defmodule Pleroma.NotificationTest do
alias Pleroma.Web.Streamer
describe "create_notifications" do
+ test "creates a notification for an emoji reaction" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ {:ok, activity} = CommonAPI.post(user, %{"status" => "yeah"})
+ {:ok, activity, _object} = CommonAPI.react_with_emoji(activity.id, other_user, "☕")
+
+ {:ok, [notification]} = Notification.create_notifications(activity)
+
+ assert notification.user_id == user.id
+ end
+
test "notifies someone when they are directly addressed" do
user = insert(:user)
other_user = insert(:user)