cannery/test/cannery_web/live/home_live_test.exs
shibao bab2b26c13
All checks were successful
continuous-integration/drone/push Build is passing
use atom keys in tests
2023-03-28 21:57:29 -04:00

23 lines
647 B
Elixir

defmodule CanneryWeb.HomeLiveTest do
@moduledoc """
Tests the home page
"""
use CanneryWeb.ConnCase
import Phoenix.LiveViewTest
@moduletag :home_live_test
test "disconnected and connected render", %{conn: conn} do
{:ok, home_live, disconnected_html} = live(conn, "/")
assert disconnected_html =~ "Welcome to Cannery"
assert render(home_live) =~ "Welcome to Cannery"
end
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
end