mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
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
This commit is contained in:
@@ -3,14 +3,14 @@ defmodule ChesstrainerWeb.EndgameLive.IndexTest do
|
||||
|
||||
import Phoenix.LiveViewTest
|
||||
import Chesstrainer.EndgamesFixtures
|
||||
import Chesstrainer.TagsFixtures
|
||||
import Chesstrainer.ThemesFixtures
|
||||
|
||||
alias Chesstrainer.Endgames
|
||||
|
||||
test "lists an endgame's themes", %{conn: conn} do
|
||||
tag = tag_fixture(%{name: "Lucena"})
|
||||
theme = theme_fixture(%{name: "Lucena"})
|
||||
endgame = endgame_fixture()
|
||||
{:ok, _endgame} = Endgames.update_endgame(endgame, %{}, [tag])
|
||||
{:ok, _endgame} = Endgames.update_endgame(endgame, %{}, [theme])
|
||||
|
||||
{:ok, _view, html} = live(conn, ~p"/admin/endgames")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user