Notifications: Add emoji reaction notifications

This commit is contained in:
lain 2020-01-22 20:06:12 +01:00
commit 615b72238e
5 changed files with 68 additions and 9 deletions

View file

@ -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)