summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-01-28 17:52:42 +0100
committerlain <lain@soykaf.club>2020-01-28 17:52:42 +0100
commitcedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e (patch)
treedfc1a2b2bb27d845bbde24b023287122f5d39ed7 /test/notification_test.exs
parentae78059ff433739b83aaa3ccff9245ace153146d (diff)
parente8f22451da18aeba9bcf9f9f6acf93690ccb3cba (diff)
downloadpleroma-cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e.tar.gz
pleroma-cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into features/remote-follow-userpage-redirect
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)