tests fixes

This commit is contained in:
Alexander Strizhakov 2020-05-01 09:20:54 +03:00
parent 86fd8fc1ef
commit bb7744ab5c
No known key found for this signature in database
GPG Key ID: 022896A53AEF1381

View File

@ -346,7 +346,7 @@ defmodule Pleroma.NotificationTest do
insert(:filter, user: user, phrase: "tesla", hide: true) insert(:filter, user: user, phrase: "tesla", hide: true)
{:ok, activity_one} = CommonAPI.post(user, %{"status" => "wow tesla"}) {:ok, activity_one} = CommonAPI.post(user, %{"status" => "wow tesla"})
{:ok, activity_two, _} = CommonAPI.favorite(activity_one.id, other_user) {:ok, activity_two} = CommonAPI.favorite(other_user, activity_one.id)
{:ok, [notification]} = Notification.create_notifications(activity_two) {:ok, [notification]} = Notification.create_notifications(activity_two)
@ -1147,7 +1147,7 @@ defmodule Pleroma.NotificationTest do
another_user = insert(:user) another_user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{"status" => "Give me my cofe!"}) {:ok, activity} = CommonAPI.post(user, %{"status" => "Give me my cofe!"})
{:ok, _, _} = CommonAPI.favorite(activity.id, another_user) {:ok, _} = CommonAPI.favorite(another_user, activity.id)
assert length(Notification.for_user(user)) == 1 assert length(Notification.for_user(user)) == 1
end end