move staging to container
This commit is contained in:
@ -860,11 +860,13 @@ defmodule Cannery.AmmoTest do
|
||||
|
||||
test "list_packs/2 returns all relevant packs including staged", %{
|
||||
type: type,
|
||||
container: container,
|
||||
pack: unstaged_pack,
|
||||
current_user: current_user
|
||||
} do
|
||||
{1, [staged_pack]} = pack_fixture(%{staged: true}, type, container, current_user)
|
||||
staged_container =
|
||||
container_fixture(%{name: "fantastic container", staged: true}, current_user)
|
||||
|
||||
{1, [staged_pack]} = pack_fixture(type, staged_container, current_user)
|
||||
|
||||
assert Ammo.list_packs(current_user, staged: false) == [unstaged_pack]
|
||||
assert Ammo.list_packs(current_user, staged: true) == [staged_pack]
|
||||
|
@ -50,7 +50,6 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
"notes" => pack.notes,
|
||||
"price_paid" => pack.price_paid,
|
||||
"lot_number" => pack.lot_number,
|
||||
"staged" => pack.staged,
|
||||
"used_count" => ActivityLog.get_used_count(current_user, pack_id: pack.id),
|
||||
"original_count" => pack |> Ammo.get_original_count(current_user),
|
||||
"cpr" => pack |> Ammo.get_cpr(current_user),
|
||||
@ -103,6 +102,7 @@ defmodule CanneryWeb.ExportControllerTest do
|
||||
"id" => container.id,
|
||||
"location" => container.location,
|
||||
"name" => container.name,
|
||||
"staged" => container.staged,
|
||||
"tags" => [
|
||||
%{
|
||||
"id" => tag.id,
|
||||
|
Reference in New Issue
Block a user