Skip to content

Commit dedd2f4

Browse files
vtm9claude
andcommitted
Expect the public tournament page for guest browsers in meta tags test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 453629a commit dedd2f4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎test/codebattle_web/meta_tags_test.exs‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,19 @@ defmodule CodebattleWeb.MetaTagsTest do
6262
assert html =~ ~s(content="1200" property="og:image:width")
6363
end
6464

65-
test "still sends a guest browser to the login page", %{conn: conn} do
65+
test "shows a guest browser the public tournament page with the card", %{conn: conn} do
6666
tournament = insert(:tournament, name: "Autumn Cup", state: "upcoming")
6767

68-
conn =
68+
html =
6969
conn
7070
|> put_req_header("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)")
7171
|> get(Routes.tournament_path(conn, :show, tournament.id))
72+
|> html_response(200)
73+
74+
assert html =~ "TournamentPublic"
7275

73-
assert redirected_to(conn, 302) =~ "/session/new"
76+
assert html =~
77+
~s(content="#{Routes.tournament_image_url(CodebattleWeb.Endpoint, :show, tournament.id)}" property="og:image")
7478
end
7579
end
7680
end

0 commit comments

Comments
 (0)