Files
chess-endgame-trainer/test/chesstrainer_web/live/endgame_live/index_test.exs
T
owenrees cd2e7f0164 Rename Tag to Theme across code and schema
Rename the endgame-label concept from Tag to Theme to match the glossary:
the context becomes Chesstrainer.Themes, the schema Chesstrainer.Themes.Theme,
and the Endgame association is :themes. The category enum
(endgame/opening/tactic) is preserved.

Rewrite the original migrations in place so themes / endgames_themes
(with theme_id) are created directly, instead of adding a transition
migration.

Closes #12
2026-11-02 09:14:17 +01:00

20 lines
517 B
Elixir

defmodule ChesstrainerWeb.EndgameLive.IndexTest do
use ChesstrainerWeb.ConnCase
import Phoenix.LiveViewTest
import Chesstrainer.EndgamesFixtures
import Chesstrainer.ThemesFixtures
alias Chesstrainer.Endgames
test "lists an endgame's themes", %{conn: conn} do
theme = theme_fixture(%{name: "Lucena"})
endgame = endgame_fixture()
{:ok, _endgame} = Endgames.update_endgame(endgame, %{}, [theme])
{:ok, _view, html} = live(conn, ~p"/admin/endgames")
assert html =~ "Lucena"
end
end