X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fnotification_test.exs;h=6add3f7eba39c9cc4287fcc2c62a6717e13981d6;hb=0883a706dc376fdfb7de9df1366803e87c8e7c98;hp=526f43fab7a53f1313bd602e2f0f392a6c70820c;hpb=828841968640f67a06ba8e2d0dd7c38b1d9e3729;p=akkoma 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)