diff options
author | lain <lain@soykaf.club> | 2023-12-13 10:05:18 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2023-12-13 10:05:18 +0000 |
commit | 02acf7c0b3e6711262f9f57cfc0554ce8e4ed50d (patch) | |
tree | 316110a818dfeb9630acbb83b2f721a180199bad /test | |
parent | 29d202e1df0cfbe110059815ca654ed1d3d93e41 (diff) | |
parent | 1458de92f0eb2e743c359a86a27db83b117595e9 (diff) | |
download | pleroma-02acf7c0b3e6711262f9f57cfc0554ce8e4ed50d.tar.gz pleroma-02acf7c0b3e6711262f9f57cfc0554ce8e4ed50d.zip |
Merge branch 'fix-develop-tests' into 'develop'
StatusViewTest: Fix tests.
See merge request pleroma/pleroma!3998
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/views/status_view_test.exs | 8 |
1 files changed, 7 insertions, 1 deletions
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 b31955891..d82eeb7af 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -11,6 +11,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do alias Pleroma.HTML alias Pleroma.Object alias Pleroma.Repo + alias Pleroma.UnstubbedConfigMock, as: ConfigMock alias Pleroma.User alias Pleroma.UserRelationship alias Pleroma.Web.CommonAPI @@ -19,9 +20,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do require Bitwise + import Mox + import OpenApiSpex.TestAssertions import Pleroma.Factory import Tesla.Mock - import OpenApiSpex.TestAssertions setup do mock(fn env -> apply(HttpRequestMock, :request, [env]) end) @@ -198,6 +200,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec()) end + @tag capture_log: true test "returns a temporary ap_id based user for activities missing db users" do user = insert(:user) @@ -784,6 +787,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do clear_config([:media_proxy, :enabled], true) clear_config([:media_preview_proxy, :enabled]) + ConfigMock + |> stub_with(Pleroma.Test.StaticConfig) + page_url = "http://example.com" card = %{ |