Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

test: expect EntryExhaustedError in re-link guard test (#4768)

joaocbatista499bfd87bd46
diff --git a/test/models/recurring_transaction/allocator_test.rb b/test/models/recurring_transaction/allocator_test.rb
index 6dedef5295..61e2d4a11a 100644
--- a/test/models/recurring_transaction/allocator_test.rb
+++ b/test/models/recurring_transaction/allocator_test.rb
@@ -438,7 +438,7 @@ class RecurringTransaction::AllocatorTest < ActiveSupport::TestCase
# The entry is fully consumed by the active allocation, so there is no
# capacity left for another active bill.
- assert_raises(ActiveRecord::RecordInvalid) do
+ assert_raises(Allocator::EntryExhaustedError) do
Allocator.new(other_occurrence).allocate!(entry: payment)
end
assert_not other_occurrence.reload.paid?