Fix some quirky test issues with non-reloaded entities
This commit is contained in:
parent
964aadbfb1
commit
cc24183cb9
2 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,11 @@ describe UpdateCharges do
|
||||||
let!(:refunds) { [force_create(:refund, charge: charges.last, payment: reverse_payment_for_refund, disbursed: true)]}
|
let!(:refunds) { [force_create(:refund, charge: charges.last, payment: reverse_payment_for_refund, disbursed: true)]}
|
||||||
before(:each) {
|
before(:each) {
|
||||||
UpdateCharges.reverse_disburse_all_with_payments([payment_to_reverse.id, payment_to_reverse_2.id, payment_to_reverse_with_refund.id, reverse_payment_for_refund.id])
|
UpdateCharges.reverse_disburse_all_with_payments([payment_to_reverse.id, payment_to_reverse_2.id, payment_to_reverse_with_refund.id, reverse_payment_for_refund.id])
|
||||||
|
|
||||||
|
payment_to_reverse.reload
|
||||||
|
payment_to_reverse_2.reload
|
||||||
|
payment_to_reverse_with_refund.reload
|
||||||
|
payment_to_ignore.reload
|
||||||
}
|
}
|
||||||
|
|
||||||
it 'reverses payments it should' do
|
it 'reverses payments it should' do
|
||||||
|
|
|
@ -65,6 +65,11 @@ describe UpdatePayouts do
|
||||||
payout.payments.push(payment_to_reverse_with_refund)
|
payout.payments.push(payment_to_reverse_with_refund)
|
||||||
payout.payments.push(reverse_payment_for_refund)
|
payout.payments.push(reverse_payment_for_refund)
|
||||||
UpdatePayouts.reverse_with_stripe(payout.id, bad_status, bad_failure_message)
|
UpdatePayouts.reverse_with_stripe(payout.id, bad_status, bad_failure_message)
|
||||||
|
payment_to_reverse.reload
|
||||||
|
payment_to_reverse_2.reload
|
||||||
|
payment_to_reverse_with_refund.reload
|
||||||
|
reverse_payment_for_refund.reload
|
||||||
|
payment_to_ignore.reload
|
||||||
}
|
}
|
||||||
|
|
||||||
it 'reverses proper payments' do
|
it 'reverses proper payments' do
|
||||||
|
|
Loading…
Reference in a new issue