diff options
author | lain <lain@soykaf.club> | 2020-01-28 17:52:42 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-01-28 17:52:42 +0100 |
commit | cedee2793d96b0384a3041ea0a6cd1f2b1c3dd1e (patch) | |
tree | dfc1a2b2bb27d845bbde24b023287122f5d39ed7 /test/notification_test.exs | |
parent | ae78059ff433739b83aaa3ccff9245ace153146d (diff) | |
parent | e8f22451da18aeba9bcf9f9f6acf93690ccb3cba (diff) | |
download | pleroma-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.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) |