test: expect EntryExhaustedError in re-link guard test

Merged
JO
1mo ago
+1-1

#4376 made guard_entry_capacity! raise Allocator::EntryExhaustedError for an exhausted entry, before the zero-amount allocation reaches the greater_than: 0 validation. The re-link test added in #3663 still asserted ActiveRecord::RecordInvalid, so main went red once both landed. Update the assertion to match; behavior is unchanged.


Summary by cubic

Updates the re-link guard test to expect Allocator::EntryExhaustedError instead of ActiveRecord::RecordInvalid, matching the behavior introduced in #4376 where an exhausted entry raises before the zero-amount validation runs. This fixes the failing test on main; behavior is unchanged.

Summary by CodeRabbit

  • Tests
    • Updated coverage for allocating an entry already fully consumed by an active bill. The test now expects an entry-exhaustion error when the same entry is allocated to another active bill. No end-user-facing behavior change is indicated by this update.