From 506a1c98e716754455387be9ace3ad7aec9c47a3 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 29 May 2023 13:55:48 -0400 Subject: [PATCH] ConnCase: Make sure the host we use in tests is the actual Endpoint host --- test/support/conn_case.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index f010fec33..d6729ab87 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -120,6 +120,10 @@ defmodule Pleroma.Web.ConnCase do Mox.verify_on_exit!() - {:ok, conn: Phoenix.ConnTest.build_conn()} + {:ok, + conn: + Phoenix.ConnTest.build_conn() + |> Map.put(:host, Pleroma.Web.Endpoint.host()) + |> Plug.Test.init_test_session(%{})} end end