spazio-solazzo/test/spazio_solazzo_web/live/page_live_test.exs
Víctor Martínez 69f992f8f6
feat: new booking system + admin dashboard (#12)
feat: implement a new booking system and admin dashboard
2026-02-07 19:08:39 +01:00

24 lines
611 B
Elixir

defmodule SpazioSolazzoWeb.PageLiveTest do
use SpazioSolazzoWeb.ConnCase
import Phoenix.LiveViewTest
alias SpazioSolazzo.BookingSystem
setup do
for {name, slug} <- [{"Coworking", "coworking"}, {"Meeting", "meeting"}, {"Music", "music"}] 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, "/coworking")
assert String.contains?(html, "/meeting")
assert String.contains?(html, "/music")
end
end