20 lines
459 B
Elixir
20 lines
459 B
Elixir
defmodule PrymnWeb.PageControllerTest do
|
|
alias Prymn.Accounts
|
|
use PrymnWeb.ConnCase
|
|
|
|
import Prymn.AccountsFixtures
|
|
|
|
test "redirect unauthenticated user", %{conn: conn} do
|
|
conn = get(conn, ~p"/")
|
|
assert html_response(conn, 302) =~ "redirected"
|
|
end
|
|
|
|
describe "authenticated" do
|
|
setup :register_and_log_in_user
|
|
|
|
test "shows page", %{conn: conn} do
|
|
conn = get(conn, ~p"/")
|
|
assert html_response(conn, 200)
|
|
end
|
|
end
|
|
end
|