livebook/test/live_book_web/live/home_live_test.exs

12 lines
324 B
Elixir
Raw Normal View History

2021-01-08 05:13:17 +08:00
defmodule LiveBookWeb.HomeLiveTest do
2021-01-08 04:16:54 +08:00
use LiveBookWeb.ConnCase
import Phoenix.LiveViewTest
test "disconnected and connected render", %{conn: conn} do
{:ok, view, disconnected_html} = live(conn, "/")
2021-01-08 05:13:17 +08:00
assert disconnected_html =~ "Welcome to LiveBook"
assert render(view) =~ "Welcome to LiveBook"
2021-01-08 04:16:54 +08:00
end
end