Merge pull request #12132 from rioug/9290-capture-payment-ignore-order-change

Fix capturing order payment ignore order changes
This commit is contained in:
Konrad
2024-02-14 23:00:49 +01:00
committed by GitHub
3 changed files with 183 additions and 104 deletions

View File

@@ -239,8 +239,11 @@ describe SubscriptionConfirmJob do
context "when payments are processed without error" do
before do
expect(payment).to receive(:process_offline!) { true }
expect(payment).to receive(:completed?) { true }
allow(payment).to receive(:process_offline!) do
# Mark payment as complete like it would be if sucessfully processed offline
payment.state = "complete"
true
end
end
it "sends only a subscription confirm email, no regular confirmation emails" do