From 20e3cb2b25be4d9598bfc2cf3870f2f451974cb6 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Dec 2022 12:19:24 +0000 Subject: [PATCH] fix csp-induced HTML match error --- test/pleroma/web/feed/user_controller_test.exs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/pleroma/web/feed/user_controller_test.exs b/test/pleroma/web/feed/user_controller_test.exs index 6e3f790b2..451ce45aa 100644 --- a/test/pleroma/web/feed/user_controller_test.exs +++ b/test/pleroma/web/feed/user_controller_test.exs @@ -184,14 +184,15 @@ defmodule Pleroma.Web.Feed.UserControllerTest do note_activity = insert(:note_activity) user = User.get_cached_by_ap_id(note_activity.data["actor"]) + %{assigns: %{csp_nonce: nonce}} = resp_conn = get(conn, "/users/#{user.nickname}") + response = - conn - |> get("/users/#{user.nickname}") + resp_conn |> response(200) assert response == Pleroma.Web.Fallback.RedirectController.redirector_with_meta( - conn, + assign(conn, :csp_nonce, nonce), %{user: user} ).resp_body end -- 2.45.2