summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:11:18 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:11:18 +0300
commit5fc2fa89086e820352a9fec571f07f29a55c4f06 (patch)
tree7e4f4d2cce9182c9ecd70af9925a5a201a13b999 /test/notification_test.exs
parentce7c887a27ad5af59f540650637a50da7f91fa52 (diff)
parentdddebee047efc4ab1dff6565bef32954695846a7 (diff)
downloadpleroma-5fc2fa89086e820352a9fec571f07f29a55c4f06.tar.gz
pleroma-5fc2fa89086e820352a9fec571f07f29a55c4f06.zip
Merge branch 'develop' into issue/1383
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)