use credo style

This commit is contained in:
2023-02-04 17:28:53 -05:00
committed by oliviasculley
parent 30d3f76fe1
commit 5c05f3b6fe
18 changed files with 47 additions and 46 deletions

View File

@ -116,7 +116,7 @@ defmodule LokalWeb.UserAuthTest do
end
test "does not authenticate if data is missing", %{conn: conn, current_user: current_user} do
_ = Accounts.generate_user_session_token(current_user)
_session_token = Accounts.generate_user_session_token(current_user)
conn = UserAuth.fetch_current_user(conn, [])
refute get_session(conn, :user_token)
refute conn.assigns.current_user

View File

@ -5,8 +5,7 @@ defmodule LokalWeb.UserConfirmationControllerTest do
use LokalWeb.ConnCase, async: true
import LokalWeb.Gettext
alias Lokal.Accounts
alias Lokal.Repo
alias Lokal.{Accounts, Repo}
@moduletag :user_confirmation_controller_test

View File

@ -40,7 +40,7 @@ defmodule LokalWeb.InviteLiveTest do
# |> form("#invite-form", invite: @invalid_attrs)
# |> render_change() =~ dgettext("errors", "can't be blank")
{:ok, _, html} =
{:ok, _live, html} =
index_live
|> form("#invite-form", invite: @create_attrs)
|> render_submit()
@ -64,7 +64,7 @@ defmodule LokalWeb.InviteLiveTest do
# |> form("#invite-form", invite: @invalid_attrs)
# |> render_change() =~ dgettext("errors", "can't be blank")
{:ok, _, html} =
{:ok, _live, html} =
index_live
|> form("#invite-form", invite: @update_attrs)
|> render_submit()

View File

@ -5,12 +5,11 @@ defmodule LokalWeb.ErrorViewTest do
use LokalWeb.ConnCase, async: true
import LokalWeb.Gettext
@moduletag :error_view_test
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
@moduletag :error_view_test
test "renders 404.html" do
assert render_to_string(LokalWeb.ErrorView, "404.html", []) =~
dgettext("errors", "Not found")