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:
Matt-Yorkley
2022-02-15 12:21:34 +00:00
parent 5be1b139b9
commit 5fba7811c4

View File

@@ -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