Merge branch 'Fix-static-dir-doc' into 'develop'
[akkoma] / test / web / federator_test.exs
index 0f43bc8f24e6d93c3857a9b265a66b80fcc365fc..6e143eee48f03d467e4865fd18af8b01c204db67 100644 (file)
@@ -12,9 +12,25 @@ defmodule Pleroma.Web.FederatorTest do
 
   setup_all do
     Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
+
+    config_path = [:instance, :federating]
+    initial_setting = Pleroma.Config.get(config_path)
+
+    Pleroma.Config.put(config_path, true)
+    on_exit(fn -> Pleroma.Config.put(config_path, initial_setting) end)
+
     :ok
   end
 
+  describe "Publisher.perform" do
+    test "call `perform` with unknown task" do
+      assert {
+               :error,
+               "Don't know what to do with this"
+             } = Pleroma.Web.Federator.Publisher.perform("test", :ok, :ok)
+    end
+  end
+
   describe "Publish an activity" do
     setup do
       user = insert(:user)