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-08 23:58:54 -05:00
|
|
|
import CanneryWeb.Gettext
|
2021-09-10 00:28:53 -04:00
|
|
|
|
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, "/")
|
2022-02-16 22:52:22 -05:00
|
|
|
assert disconnected_html =~ gettext("Welcome to %{name}", name: "Cannery")
|
|
|
|
assert render(home_live) =~ gettext("Welcome to %{name}", name: "Cannery")
|
2021-09-10 00:28:53 -04:00
|
|
|
end
|
|
|
|
end
|