2021-09-10 00:28:53 -04:00
|
|
|
defmodule CanneryWeb.HomeLiveTest do
|
2022-02-16 22:52:22 -05:00
|
|
|
@moduledoc """
|
|
|
|
Tests the home page
|
|
|
|
"""
|
|
|
|
|
2021-09-10 00:28:53 -04:00
|
|
|
use CanneryWeb.ConnCase
|
|
|
|
import Phoenix.LiveViewTest
|
|
|
|
|
2022-02-16 22:52:22 -05:00
|
|
|
@moduletag :home_live_test
|
|
|
|
|
2021-09-10 00:28:53 -04:00
|
|
|
test "disconnected and connected render", %{conn: conn} do
|
|
|
|
{:ok, home_live, disconnected_html} = live(conn, "/")
|
2023-03-28 21:57:29 -04:00
|
|
|
assert disconnected_html =~ "Welcome to Cannery"
|
|
|
|
assert render(home_live) =~ "Welcome to Cannery"
|
2021-09-10 00:28:53 -04:00
|
|
|
end
|
2022-11-19 10:31:13 -05:00
|
|
|
|
|
|
|
test "displays version number", %{conn: conn} do
|
|
|
|
{:ok, home_live, disconnected_html} = live(conn, "/")
|
|
|
|
assert disconnected_html =~ Mix.Project.config()[:version]
|
|
|
|
assert render(home_live) =~ Mix.Project.config()[:version]
|
|
|
|
end
|
2021-09-10 00:28:53 -04:00
|
|
|
end
|