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)