mirror of
https://codeberg.org/JasterV/spazio-solazzo.git
synced 2026-04-27 02:25:40 +00:00
* feat: add new images * update seeds * use new images & slugs * update tests with new slugs
29 lines
734 B
Elixir
29 lines
734 B
Elixir
defmodule SpazioSolazzoWeb.MusicLiveTest do
|
|
use SpazioSolazzoWeb.ConnCase
|
|
import Phoenix.LiveViewTest
|
|
|
|
alias SpazioSolazzo.BookingSystem
|
|
|
|
setup do
|
|
{:ok, space} = BookingSystem.create_space("HallTest", "hall", "desc", 1)
|
|
|
|
%{space: space}
|
|
end
|
|
|
|
describe "MusicLive landing page" do
|
|
test "renders music landing page with space information", %{
|
|
conn: conn,
|
|
space: space
|
|
} do
|
|
{:ok, _view, html} = live(conn, "/hall")
|
|
|
|
assert html =~ space.name
|
|
end
|
|
|
|
test "has link to space booking page with correct space slug", %{conn: conn, space: space} do
|
|
{:ok, view, _html} = live(conn, "/hall")
|
|
|
|
assert has_element?(view, "a[href='/book/space/#{space.slug}']")
|
|
end
|
|
end
|
|
end
|