From 2e5aa7117659a2c5b108910efa6fa4bd63cd2fa3 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 8 May 2024 00:26:32 +0000 Subject: [PATCH] Rich Media Cards are fetched asynchonously and not guaranteed to be available on first post render --- .../controllers/status_controller_test.exs | 17 ----------------- 1 file changed, 17 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 index f6934a751..499596a53 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -364,23 +364,6 @@ test "posting a fake status", %{conn: conn} 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) - clear_config([:rich_media, :enabled], true) - - 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}"