Refactor conn aliasing in controller tests to use pipe chains

Applied refactor_conn_aliasing.sh to eliminate conn shadowing.

Show draft posts in test and dev
This commit is contained in:
Willem van den Ende
2026-03-20 21:36:08 +00:00
parent 5d040b4062
commit 6a5269f30a
7 changed files with 74 additions and 52 deletions
@@ -2,8 +2,7 @@ defmodule FirehoseWeb.PageControllerTest do
use FirehoseWeb.ConnCase
test "GET /", %{conn: conn} do
conn = get(conn, ~p"/")
body = html_response(conn, 200)
body = conn |> get(~p"/") |> html_response(200)
assert body =~ "Drinking from the firehose"
assert body =~ "Willem van den Ende"
end