fix csp-induced HTML match error
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details

This commit is contained in:
FloatingGhost 2022-12-16 12:19:24 +00:00
parent 426f4271c2
commit 20e3cb2b25
1 changed files with 4 additions and 3 deletions

View File

@ -184,14 +184,15 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
note_activity = insert(:note_activity) note_activity = insert(:note_activity)
user = User.get_cached_by_ap_id(note_activity.data["actor"]) user = User.get_cached_by_ap_id(note_activity.data["actor"])
%{assigns: %{csp_nonce: nonce}} = resp_conn = get(conn, "/users/#{user.nickname}")
response = response =
conn resp_conn
|> get("/users/#{user.nickname}")
|> response(200) |> response(200)
assert response == assert response ==
Pleroma.Web.Fallback.RedirectController.redirector_with_meta( Pleroma.Web.Fallback.RedirectController.redirector_with_meta(
conn, assign(conn, :csp_nonce, nonce),
%{user: user} %{user: user}
).resp_body ).resp_body
end end