X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fweb%2Fpush%2Fimpl_test.exs;h=b2664bf288501f29ae5dc40226aaf5b05ff5c473;hb=d5cdc907e3fda14c2ce78ddbb124739441330ecc;hp=9f931c941e0cdfc0d9f2bcb902c57cc68eb2e7fe;hpb=b2eb1124d115beda0907121c3c6f10783b34f352;p=akkoma diff --git a/test/web/push/impl_test.exs b/test/web/push/impl_test.exs index 9f931c941..b2664bf28 100644 --- a/test/web/push/impl_test.exs +++ b/test/web/push/impl_test.exs @@ -63,12 +63,12 @@ defmodule Pleroma.Web.Push.ImplTest do activity: activity ) - assert Impl.perform(notif) == [:ok, :ok] + assert Impl.perform(notif) == {:ok, [:ok, :ok]} end @tag capture_log: true test "returns error if notif does not match " do - assert Impl.perform(%{}) == :error + assert Impl.perform(%{}) == {:error, :unknown_type} end test "successful message sending" do @@ -170,7 +170,7 @@ defmodule Pleroma.Web.Push.ImplTest do "Lorem ipsum dolor sit amet, consectetur :firefox: adipiscing elit. Fusce sagittis finibus turpis." }) - {:ok, activity, _} = CommonAPI.favorite(activity.id, user) + {:ok, activity} = CommonAPI.favorite(user, activity.id) object = Object.normalize(activity) assert Impl.format_body(%{activity: activity}, user, object) == "@Bob has favorited your post"