pass user session controller test

This commit is contained in:
shibao 2022-02-16 21:12:04 -05:00
parent 36b814a8a9
commit 954cdf185c

View File

@ -1,9 +1,12 @@
defmodule CanneryWeb.UserSessionControllerTest do defmodule CanneryWeb.UserSessionControllerTest do
@moduledoc """
Tests the user session controller
"""
use CanneryWeb.ConnCase, async: true use CanneryWeb.ConnCase, async: true
import CanneryWeb.Gettext import CanneryWeb.Gettext
import Cannery.AccountsFixtures
@moduletag :user_session_controller @moduletag :user_session_controller_test
setup do setup do
%{user: user_fixture()} %{user: user_fixture()}
@ -14,7 +17,6 @@ defmodule CanneryWeb.UserSessionControllerTest do
conn = get(conn, Routes.user_session_path(conn, :new)) conn = get(conn, Routes.user_session_path(conn, :new))
response = html_response(conn, 200) response = html_response(conn, 200)
assert response =~ dgettext("actions", "Log in") assert response =~ dgettext("actions", "Log in")
assert response =~ dgettext("actions", "Register")
end end
test "redirects if already logged in", %{conn: conn, user: user} do test "redirects if already logged in", %{conn: conn, user: user} do