mix format
This commit is contained in:
parent
8f807c2ebc
commit
08f87d38eb
@ -35,6 +35,8 @@ defmodule Cannery.Mailer do
|
||||
"""
|
||||
@spec deliver_update_email_instructions(User.t(), String.t()) :: Job.t()
|
||||
def deliver_update_email_instructions(%User{id: user_id}, url) do
|
||||
%{email: :update_email, user_id: user_id, attrs: %{url: url}} |> EmailWorker.new() |> Oban.insert!()
|
||||
%{email: :update_email, user_id: user_id, attrs: %{url: url}}
|
||||
|> EmailWorker.new()
|
||||
|> Oban.insert!()
|
||||
end
|
||||
end
|
||||
|
@ -50,12 +50,12 @@
|
||||
<div class="px-4 py-2 space-x-4 flex justify-center items-center">
|
||||
<%= live_redirect to: Routes.ammo_type_show_path(@socket, :show, ammo_type),
|
||||
class: "text-primary-500 link" do %>
|
||||
<i class="fa-lg fas fa-eye"></i>
|
||||
<i class="fa-fw fa-lg fas fa-eye"></i>
|
||||
<% end %>
|
||||
|
||||
<%= live_patch to: Routes.ammo_type_index_path(@socket, :edit, ammo_type),
|
||||
class: "text-primary-500 link" do %>
|
||||
<i class="fa-lg fas fa-edit"></i>
|
||||
<i class="fa-fw fa-lg fas fa-edit"></i>
|
||||
<% end %>
|
||||
|
||||
<%= link to: "#",
|
||||
|
@ -9,8 +9,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
alias Cannery.{
|
||||
ActivityLog,
|
||||
ActivityLog.ShotGroup,
|
||||
Ammo,
|
||||
Containers
|
||||
Ammo
|
||||
}
|
||||
|
||||
@moduletag :activity_log_test
|
||||
@ -87,13 +86,10 @@ defmodule Cannery.ActivityLogTest do
|
||||
end
|
||||
|
||||
test "create_shot_group/1 does not remove more than ammo group amount",
|
||||
%{
|
||||
current_user: current_user,
|
||||
ammo_group: %{id: ammo_group_id, count: org_count} = ammo_group
|
||||
} do
|
||||
%{current_user: current_user, ammo_group: %{id: ammo_group_id} = ammo_group} do
|
||||
valid_attrs = %{"count" => 20, "date" => ~D[2022-02-13], "notes" => "some notes"}
|
||||
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
assert {:ok, %ShotGroup{}} =
|
||||
ActivityLog.create_shot_group(valid_attrs, current_user, ammo_group)
|
||||
|
||||
ammo_group = ammo_group_id |> Ammo.get_ammo_group!(current_user)
|
||||
@ -115,7 +111,7 @@ defmodule Cannery.ActivityLogTest do
|
||||
test "update_shot_group/2 with valid data updates the shot_group and ammo_group",
|
||||
%{
|
||||
shot_group: shot_group,
|
||||
ammo_group: %{id: ammo_group_id} = ammo_group,
|
||||
ammo_group: %{id: ammo_group_id},
|
||||
current_user: current_user
|
||||
} do
|
||||
assert {:ok, %ShotGroup{} = shot_group} =
|
||||
|
@ -5,7 +5,7 @@ defmodule Cannery.ContainersTest do
|
||||
|
||||
use Cannery.DataCase
|
||||
alias Cannery.Containers
|
||||
alias Cannery.{Accounts.User, Containers.Container}
|
||||
alias Cannery.{Containers.Container}
|
||||
alias Ecto.Changeset
|
||||
|
||||
@moduletag :containers_test
|
||||
@ -41,8 +41,7 @@ defmodule Cannery.ContainersTest do
|
||||
assert Containers.get_container!(container.id, current_user) == container
|
||||
end
|
||||
|
||||
test "create_container/1 with valid data creates a container",
|
||||
%{current_user: current_user, container: container} do
|
||||
test "create_container/1 with valid data creates a container", %{current_user: current_user} do
|
||||
assert {:ok, %Container{} = container} =
|
||||
@valid_attrs |> Containers.create_container(current_user)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user