summaryrefslogtreecommitdiff
path: root/test/notification_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-30 11:40:34 +0200
committerlain <lain@soykaf.club>2020-06-30 11:40:34 +0200
commit0176b7bca2e64f82228129024ac059e3bee00675 (patch)
treec7e092a07c8ec5d672142dc56a72fae8981422f3 /test/notification_test.exs
parent8630a6c7f52a68ab32025b1c80a6398599908c68 (diff)
parent2382a2a1511e1042d960946aacfde7a49fac9dd0 (diff)
downloadpleroma-0176b7bca2e64f82228129024ac059e3bee00675.tar.gz
pleroma-0176b7bca2e64f82228129024ac059e3bee00675.zip
Merge branch 'preload-fixups-2' into preloadfixups
Diffstat (limited to 'test/notification_test.exs')
-rw-r--r--test/notification_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/notification_test.exs b/test/notification_test.exs
index 526f43fab..6add3f7eb 100644
--- a/test/notification_test.exs
+++ b/test/notification_test.exs
@@ -22,6 +22,16 @@ defmodule Pleroma.NotificationTest do
alias Pleroma.Web.Streamer
describe "create_notifications" do
+ test "never returns nil" do
+ user = insert(:user)
+ other_user = insert(:user, %{invisible: true})
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "yeah"})
+ {:ok, activity} = CommonAPI.react_with_emoji(activity.id, other_user, "☕")
+
+ refute {:ok, [nil]} == Notification.create_notifications(activity)
+ end
+
test "creates a notification for an emoji reaction" do
user = insert(:user)
other_user = insert(:user)