diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-05 07:56:36 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-05 07:56:36 +0300 |
commit | e84fee5b8624c8909ddd8a7e0d99c6beea4f54d0 (patch) | |
tree | d0d2bfc3d847f9bb4fa03f08d9d60f49042b2688 /test/notification_test.exs | |
parent | 86e4d23acb640efea8cbc879ddbeadfa0e04f9c8 (diff) | |
parent | a56db789359c7c7d57b45e6c68f791eeadc171e4 (diff) | |
download | pleroma-e84fee5b8624c8909ddd8a7e0d99c6beea4f54d0.tar.gz pleroma-e84fee5b8624c8909ddd8a7e0d99c6beea4f54d0.zip |
Merge remote-tracking branch 'remotes/origin/develop' into 1505-threads-federation
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r-- | test/notification_test.exs | 12 |
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) |