Merge branch 'fix-test' into 'develop'
[akkoma] / test / web / federator_test.exs
index 1d48931b54e3626e508cf4951b760f2ca52a3414..87bf73dbd34659422d6b37cda103e6841a0593ca 100644 (file)
@@ -5,6 +5,11 @@ defmodule Pleroma.Web.FederatorTest do
   import Pleroma.Factory
   import Mock
 
+  setup_all do
+    Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
+    :ok
+  end
+
   test "enqueues an element according to priority" do
     queue = [%{item: 1, priority: 2}]
 
@@ -73,7 +78,7 @@ defmodule Pleroma.Web.FederatorTest do
           "type" => "Note",
           "content" => "hi world!",
           "id" => "http://mastodon.example.org/users/admin/objects/1",
-          "attributedTo" => "http://mastodon.example.org/users/admin",
+          "attributedTo" => "http://mastodon.example.org/users/admin"
         },
         "to" => ["https://www.w3.org/ns/activitystreams#Public"]
       }
@@ -91,7 +96,7 @@ defmodule Pleroma.Web.FederatorTest do
           "type" => "Note",
           "content" => "hi world!",
           "id" => "http://mastodon.example.org/users/admin/objects/1",
-          "attributedTo" => "http://mastodon.example.org/users/admin",
+          "attributedTo" => "http://mastodon.example.org/users/admin"
         },
         "to" => ["https://www.w3.org/ns/activitystreams#Public"]
       }