logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: c16c023ebf957dc115632235baf91a3f9041e74b
parent fa66bd95dc5a24e626a183cc5fab593ea87b14b7
Author: Mark Felder <feld@feld.me>
Date:   Wed,  8 May 2024 00:26:32 +0000

Rich Media Cards are fetched asynchonously and not guaranteed to be available on first post render

Diffstat:

Mtest/pleroma/web/mastodon_api/controllers/status_controller_test.exs22----------------------
1 file changed, 0 insertions(+), 22 deletions(-)

diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -329,28 +329,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do assert real_status == fake_status end - test "posting a status with OGP link preview", %{conn: conn} do - Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) - - Pleroma.StaticStubbedConfigMock - |> stub(:get, fn - [:rich_media, :enabled] -> true - path -> Pleroma.Test.StaticConfig.get(path) - end) - - conn = - conn - |> put_req_header("content-type", "application/json") - |> post("/api/v1/statuses", %{ - "status" => "https://example.com/ogp" - }) - - assert %{"id" => id, "card" => %{"title" => "The Rock"}} = - json_response_and_validate_schema(conn, 200) - - assert Activity.get_by_id(id) - end - test "posting a direct status", %{conn: conn} do user2 = insert(:user) content = "direct cofe @#{user2.nickname}"