logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: f5a2337b3768ed835c860a11b5818668a2e5ff45
parent 6e448ef2396852c0e2f981500fbe034c93879789
Author: Lain Soykaf <lain@lain.com>
Date:   Mon, 11 Dec 2023 10:46:26 +0400

CommonAPITest: Fix tests

Diffstat:

Mtest/pleroma/web/common_api_test.exs13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs @@ -12,6 +12,7 @@ defmodule Pleroma.Web.CommonAPITest do alias Pleroma.Notification alias Pleroma.Object alias Pleroma.Repo + alias Pleroma.UnstubbedConfigMock, as: ConfigMock alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Transmogrifier @@ -20,9 +21,10 @@ defmodule Pleroma.Web.CommonAPITest do alias Pleroma.Web.CommonAPI alias Pleroma.Workers.PollWorker - import Pleroma.Factory - import Mock import Ecto.Query, only: [from: 2] + import Mock + import Mox + import Pleroma.Factory require Pleroma.Constants @@ -31,6 +33,13 @@ defmodule Pleroma.Web.CommonAPITest do :ok end + setup do + ConfigMock + |> stub_with(Pleroma.Test.StaticConfig) + + :ok + end + setup do: clear_config([:instance, :safe_dm_mentions]) setup do: clear_config([:instance, :limit]) setup do: clear_config([:instance, :max_pinned_statuses])