memEx/test/memex_web/live/home_live_test.exs

17 lines
558 B
Elixir
Raw Permalink Normal View History

2022-07-25 19:31:54 -04:00
defmodule MemexWeb.HomeLiveTest do
2023-04-14 23:50:16 -04:00
use MemexWeb.ConnCase, async: true
2021-03-11 21:12:55 -05:00
import Phoenix.LiveViewTest
test "disconnected and connected render", %{conn: conn} do
2023-04-13 23:29:29 -04:00
{:ok, page_live, disconnected_html} = live(conn, ~p"/")
2022-11-26 20:36:09 -05:00
assert disconnected_html =~ "memEx"
assert render(page_live) =~ "memEx"
2021-03-11 21:12:55 -05:00
end
2023-04-14 19:51:14 -04:00
test "displays version number", %{conn: conn} do
{:ok, home_live, disconnected_html} = live(conn, ~p"/")
assert disconnected_html =~ Mix.Project.config()[:version]
assert render(home_live) =~ Mix.Project.config()[:version]
end
2021-03-11 21:12:55 -05:00
end