Fix test
authorMark Felder <feld@FreeBSD.org>
Tue, 23 Jul 2019 18:57:22 +0000 (13:57 -0500)
committerMark Felder <feld@FreeBSD.org>
Tue, 23 Jul 2019 18:57:22 +0000 (13:57 -0500)
test/notification_test.exs

index 06f0b6557f1a97095c09f76be58b313134dd02ce..28f8df49dfb44daf2a35bbd5ec505bc0556e463b 100644 (file)
@@ -52,13 +52,17 @@ defmodule Pleroma.NotificationTest do
 
       {:ok, activity} = CommonAPI.post(user, %{"status" => "test post"})
 
-      {:ok, reply_activity} =
+      {:ok, _reply_activity} =
         CommonAPI.post(other_user, %{
           "status" => "test reply",
           "in_reply_to_status_id" => activity.id
         })
 
-      refute Notification.create_notification(reply_activity, subscriber)
+      user_notifications = Notification.for_user(user)
+      assert length(user_notifications) == 1
+
+      subscriber_notifications = Notification.for_user(subscriber)
+      assert Enum.empty?(subscriber_notifications)
     end
   end