diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index b904a6fdcb..3a18c84b43 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -611,9 +611,7 @@ def handle_incoming( end end - def handle_incoming(_, _) do - IO.inspect(:error) - end + def handle_incoming(_, _), do: :error @spec get_obj_helper(String.t(), Keyword.t()) :: {:ok, Object.t()} | nil def get_obj_helper(id, options \\ []) do diff --git a/test/pleroma/integration/mastodon_websocket_test.exs b/test/pleroma/integration/mastodon_websocket_test.exs index a2c20f0a6c..bfa810eb61 100644 --- a/test/pleroma/integration/mastodon_websocket_test.exs +++ b/test/pleroma/integration/mastodon_websocket_test.exs @@ -10,6 +10,7 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do import Pleroma.Factory alias Pleroma.Integration.WebsocketClient + alias Pleroma.Tests.ObanHelpers alias Pleroma.Web.CommonAPI alias Pleroma.Web.OAuth @@ -21,6 +22,11 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do |> Map.put(:path, "/api/v1/streaming") |> URI.to_string() + setup do + Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config) + :ok + end + def start_socket(qs \\ nil, headers \\ []) do path = case qs do @@ -480,6 +486,8 @@ test "receives notifications", %{user: reading_user, token: token} do visibility: "private" }) + ObanHelpers.perform_all() + assert_receive {:text, raw_json}, 1_000 assert {:ok, diff --git a/test/pleroma/web/activity_pub/activity_pub_test.exs b/test/pleroma/web/activity_pub/activity_pub_test.exs index 454d110279..462b10c9a5 100644 --- a/test/pleroma/web/activity_pub/activity_pub_test.exs +++ b/test/pleroma/web/activity_pub/activity_pub_test.exs @@ -24,6 +24,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do import Tesla.Mock setup do + Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config) mock(fn env -> apply(HttpRequestMock, :request, [env]) end) :ok end diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index a320802746..4fd644ffde 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -29,8 +29,10 @@ defmodule Pleroma.Web.CommonAPITest do setup_all do Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) - Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config) + end + setup do + Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config) :ok end diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index e83328350a..2c5b5ba11c 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -445,7 +445,6 @@ test "a quote post" do assert status.pleroma.quote_visible # Quotes don't go more than one level deep\ - IO.inspect(status.pleroma.quote.pleroma) refute status.pleroma.quote.pleroma.quote assert status.pleroma.quote.pleroma.quote_id == to_string(post.id) assert status.pleroma.quote.pleroma.quote_url == Object.normalize(post).data["id"] diff --git a/test/pleroma/workers/cron/digest_emails_worker_test.exs b/test/pleroma/workers/cron/digest_emails_worker_test.exs index b62232b449..e318aa6e5d 100644 --- a/test/pleroma/workers/cron/digest_emails_worker_test.exs +++ b/test/pleroma/workers/cron/digest_emails_worker_test.exs @@ -11,9 +11,9 @@ defmodule Pleroma.Workers.Cron.DigestEmailsWorkerTest do alias Pleroma.User alias Pleroma.Web.CommonAPI - setup do: clear_config([:email_notifications, :digest]) - setup do + clear_config([:email_notifications, :digest]) + Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config) :ok end