yak(behavior-tests-web-controllers-and-auth-edge-cases-o04i): behavior tests: web controllers and auth edge cases

This commit is contained in:
Willem van den Ende
2026-10-29 10:15:21 +00:00
parent b2bd6bc3aa
commit 9c0f33e6ca
6 changed files with 90 additions and 10 deletions
@@ -21,6 +21,17 @@ defmodule FirehoseWeb.PageControllerTest do
end
end
describe "GET /contact" do
test "renders the contact page inside the app layout", %{conn: conn} do
body = conn |> get(~p"/contact") |> html_response(200)
# Page content (contact.html.heex) ...
assert body =~ "Get in touch"
# ... wrapped by the app layout, which is where the site nav lives.
assert body =~ ~s|/blog/engineering|
end
end
describe "GET / when authenticated" do
setup :register_and_log_in_user