mirror of
https://codeberg.org/JasterV/spazio-solazzo.git
synced 2026-04-27 02:25:40 +00:00
24 lines
607 B
Elixir
24 lines
607 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")
|
|
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
|