X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fnotification_test.exs;h=1504004c8b3095d70e7016901b04be0d01b74dfd;hb=0300bc5569a6fd8b728659dc5198896d25f41c80;hp=eee1c9fa38c0cb6d26847cb353cfa84759ae239a;hpb=e6a78c6ed0925c27ea4d194c0e52ab07542c444e;p=akkoma diff --git a/test/notification_test.exs b/test/notification_test.exs index eee1c9fa3..1504004c8 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -14,9 +14,9 @@ defmodule Pleroma.NotificationTest do {:ok, [notification, other_notification]} = Notification.create_notifications(activity) - assert notification.user_id == other_user.id + notified_ids = Enum.sort([notification.user_id, other_notification.user_id]) + assert notified_ids == [other_user.id, third_user.id] assert notification.activity_id == activity.id - assert other_notification.user_id == third_user.id assert other_notification.activity_id == activity.id end end @@ -50,7 +50,7 @@ defmodule Pleroma.NotificationTest do {:ok, activity} = TwitterAPI.create_status(user, %{"status" => "hey @#{other_user.nickname}"}) {:ok, [notification]} = Notification.create_notifications(activity) - {:error, notification} = Notification.get(user, notification.id) + {:error, _notification} = Notification.get(user, notification.id) end end @@ -72,7 +72,7 @@ defmodule Pleroma.NotificationTest do {:ok, activity} = TwitterAPI.create_status(user, %{"status" => "hey @#{other_user.nickname}"}) {:ok, [notification]} = Notification.create_notifications(activity) - {:error, notification} = Notification.dismiss(user, notification.id) + {:error, _notification} = Notification.dismiss(user, notification.id) end end