mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove #try
#try is useful when the object might be nil or might not respond to the given method. In this case we expect it to exist and respond to #finalized?, so this is a bit more precise.
This commit is contained in:
@@ -413,7 +413,7 @@ describe Spree::Payment do
|
||||
|
||||
it "should not applied any transaction fees" do
|
||||
payment.credit!
|
||||
expect(payment.adjustment.try(:finalized?)).to eq(false)
|
||||
expect(payment.adjustment.finalized?).to eq(false)
|
||||
expect(order.all_adjustments.payment_fee.eligible.length).to eq(0)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user