pass home live test

This commit is contained in:
shibao 2022-02-16 22:52:22 -05:00
parent 6c5891c3df
commit bbd2fd795e

View File

@ -1,11 +1,17 @@
defmodule CanneryWeb.HomeLiveTest do defmodule CanneryWeb.HomeLiveTest do
@moduledoc """
Tests the home page
"""
use CanneryWeb.ConnCase use CanneryWeb.ConnCase
import Phoenix.LiveViewTest import Phoenix.LiveViewTest
import CanneryWeb.Gettext import CanneryWeb.Gettext
@moduletag :home_live_test
test "disconnected and connected render", %{conn: conn} do test "disconnected and connected render", %{conn: conn} do
{:ok, home_live, disconnected_html} = live(conn, "/") {:ok, home_live, disconnected_html} = live(conn, "/")
assert disconnected_html =~ "Welcome to Cannery" assert disconnected_html =~ gettext("Welcome to %{name}", name: "Cannery")
assert render(home_live) =~ "Welcome to Cannery" assert render(home_live) =~ gettext("Welcome to %{name}", name: "Cannery")
end end
end end