diff --git a/test/cannery_web/controllers/user_auth_test.exs b/test/cannery_web/controllers/user_auth_test.exs index e2727d73..bbb45df2 100644 --- a/test/cannery_web/controllers/user_auth_test.exs +++ b/test/cannery_web/controllers/user_auth_test.exs @@ -1,10 +1,13 @@ defmodule CanneryWeb.UserAuthTest do - use CanneryWeb.ConnCase, async: true + @moduledoc """ + Tests user auth + """ + use CanneryWeb.ConnCase, async: true alias Cannery.Accounts alias CanneryWeb.UserAuth - import Cannery.AccountsFixtures + @moduletag :user_auth_test @remember_me_cookie "_cannery_web_user_remember_me" setup %{conn: conn} do @@ -140,7 +143,7 @@ defmodule CanneryWeb.UserAuthTest do test "stores the path to redirect to on GET", %{conn: conn} do halted_conn = - %{conn | request_path: "/foo", query_string: ""} + %{conn | path_info: ["foo"], query_string: ""} |> fetch_flash() |> UserAuth.require_authenticated_user([]) @@ -148,7 +151,7 @@ defmodule CanneryWeb.UserAuthTest do assert get_session(halted_conn, :user_return_to) == "/foo" halted_conn = - %{conn | request_path: "/foo", query_string: "bar=baz"} + %{conn | path_info: ["foo"], query_string: "bar=baz"} |> fetch_flash() |> UserAuth.require_authenticated_user([]) @@ -156,7 +159,7 @@ defmodule CanneryWeb.UserAuthTest do assert get_session(halted_conn, :user_return_to) == "/foo?bar=baz" halted_conn = - %{conn | request_path: "/foo?bar", method: "POST"} + %{conn | path_info: ["/foo?bar"], method: "POST"} |> fetch_flash() |> UserAuth.require_authenticated_user([])