fix tests
authorEgor Kislitsyn <egor@kislitsyn.com>
Wed, 6 Feb 2019 05:17:41 +0000 (12:17 +0700)
committerEgor Kislitsyn <egor@kislitsyn.com>
Wed, 6 Feb 2019 05:17:41 +0000 (12:17 +0700)
test/web/federator_test.exs

index 147086918e66afce1b218be491016ee0f9001be9..b56694a8bfa5cad76f1a013d11ae6a61397b37d6 100644 (file)
@@ -87,11 +87,9 @@ defmodule Pleroma.Web.FederatorTest do
       {:ok, _activity} =
         CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
 
-      assert called(
-               Federator.enqueue(:publish_single_ap, %{inbox: inbox1, unreachable_since: dt})
-             )
+      assert called(Federator.publish_single_ap(%{inbox: inbox1, unreachable_since: dt}))
 
-      refute called(Federator.enqueue(:publish_single_ap, %{inbox: inbox2}))
+      refute called(Federator.publish_single_ap(%{inbox: inbox2}))
     end
 
     test_with_mock "it federates only to reachable instances via Websub",
@@ -123,13 +121,13 @@ defmodule Pleroma.Web.FederatorTest do
       {:ok, _activity} = CommonAPI.post(user, %{"status" => "HI"})
 
       assert called(
-               Federator.enqueue(:publish_single_websub, %{
+               Federator.publish_single_websub(%{
                  callback: sub2.callback,
                  unreachable_since: dt
                })
              )
 
-      refute called(Federator.enqueue(:publish_single_websub, %{callback: sub1.callback}))
+      refute called(Federator.publish_single_websub(%{callback: sub1.callback}))
     end
 
     test_with_mock "it federates only to reachable instances via Salmon",
@@ -163,13 +161,13 @@ defmodule Pleroma.Web.FederatorTest do
         CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
 
       assert called(
-               Federator.enqueue(:publish_single_salmon, %{
+               Federator.publish_single_salmon(%{
                  recipient: remote_user2,
                  unreachable_since: dt
                })
              )
 
-      refute called(Federator.enqueue(:publish_single_websub, %{recipient: remote_user1}))
+      refute called(Federator.publish_single_websub(%{recipient: remote_user1}))
     end
   end