Skip to content

Commit bebd0fd

Browse files
committed
test deallocate not allocated [test_deallocate_unallocated]
1 parent 8ad3236 commit bebd0fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test_batches.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ def test_deallocate():
4141
batch.allocate(line)
4242
batch.deallocate(line)
4343
assert batch.available_quantity == 20
44+
45+
46+
def test_can_only_deallocate_allocated_lines():
47+
batch, unallocated_line = make_batch_and_line("DECORATIVE-TRINKET", 20, 2)
48+
batch.deallocate(unallocated_line)
49+
assert batch.available_quantity == 20

0 commit comments

Comments
 (0)