mirror of
https://codeberg.org/JasterV/spazio-solazzo.git
synced 2026-04-26 18:20:03 +00:00
* feat: add new images * update seeds * use new images & slugs * update tests with new slugs
28 lines
660 B
Elixir
28 lines
660 B
Elixir
defmodule SpazioSolazzoWeb.PageLiveTest do
|
|
use SpazioSolazzoWeb.ConnCase
|
|
import Phoenix.LiveViewTest
|
|
|
|
alias SpazioSolazzo.BookingSystem
|
|
|
|
setup do
|
|
for {name, slug} <- [
|
|
{"Arcipelago", "arcipelago"},
|
|
{"Media Room", "media-room"},
|
|
{"Hall", "hall"}
|
|
] do
|
|
BookingSystem.create_space!(name, slug, "desc", 10)
|
|
end
|
|
|
|
:ok
|
|
end
|
|
|
|
test "homepage shows three space cards", %{conn: conn} do
|
|
{:ok, view, _html} = live(conn, "/")
|
|
|
|
html = render(view)
|
|
|
|
assert String.contains?(html, "/arcipelago")
|
|
assert String.contains?(html, "/media-room")
|
|
assert String.contains?(html, "/hall")
|
|
end
|
|
end
|