summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:42:10 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-01-23 11:42:10 +0300
commit2cfe1b93854c117fda19e54ea17c99f72413a569 (patch)
tree1ae8ca344d7f970db4f6f6cb9283d3cf21d1756a /test/notification_test.exs
parent5ea859644897354dfea47655ce39dda46439040a (diff)
parentdddebee047efc4ab1dff6565bef32954695846a7 (diff)
downloadpleroma-2cfe1b93854c117fda19e54ea17c99f72413a569.tar.gz
pleroma-2cfe1b93854c117fda19e54ea17c99f72413a569.zip
Merge branch 'develop' into feature/tag_feed
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)