summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-01-22 20:06:12 +0100
committerlain <lain@soykaf.club>2020-01-22 20:06:12 +0100
commit615b72238eb41f631c43e85d40c423017e848044 (patch)
treeaad0cd71d09e5f8ef8aebed8f0b8360819cfb2ef /test/notification_test.exs
parent34aa0c542bd0d2e84829146d26bc573320d54a4f (diff)
downloadpleroma-615b72238eb41f631c43e85d40c423017e848044.tar.gz
pleroma-615b72238eb41f631c43e85d40c423017e848044.zip
Notifications: Add emoji reaction notifications
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)