Add test for the integration with Solidus backend#237
Merged
rainerdema merged 2 commits intoMar 22, 2023
Merged
Conversation
58a5f40 to
6d65a67
Compare
Codecov Report
@@ Coverage Diff @@
## master #237 +/- ##
==========================================
+ Coverage 98.35% 99.78% +1.42%
==========================================
Files 23 24 +1
Lines 426 469 +43
==========================================
+ Hits 419 468 +49
+ Misses 7 1 -6
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
6d65a67 to
033aa2e
Compare
waiting-for-dev
approved these changes
Mar 22, 2023
elia
reviewed
Mar 22, 2023
elia
left a comment
Member
There was a problem hiding this comment.
Great to see this also finally covered by specs 🙌
Left a few comments, mostly nits but I'm interested in your take
elia
approved these changes
Mar 22, 2023
This commit updates the void and credit methods in `SolidusStripe::Gateway` to remove the `_source` parameter, which is no longer required when calling these methods due to the `payment_profiles_supported?` being set to false. This change is necessary because the `_source` parameter was previously defined but not called when invoking these methods in Solidus. Specifically, this change is made to align with the behavior of the: - void action invoked in Spree::Payment::Processing#void_transaction! (https://github.com/solidusio/solidus/blob/6d5580068d00c8fb711710a71e350e4c1358946c/core/app/models/spree/payment/processing.rb#L98) - credit action invoked in Spree::Refund#process! (https://github.com/solidusio/solidus/blob/6d5580068d00c8fb711710a71e350e4c1358946c/core/app/models/spree/refund.rb#L68)
033aa2e to
df6af3a
Compare
elia
approved these changes
Mar 22, 2023
elia
left a comment
Member
There was a problem hiding this comment.
Awesome, one final nit, not blocking ✅
This commit adds new tests to cover basic Stripe payment use cases. The tests verify payment creation, cancellation, capture, refund, and void operations. Note that these tests do not cover payment creation through a Stripe interface in Solidus Backend that currently doesn't exist. Additionally, there are identified issues with canceled orders and payments not being correctly voided due to limitations in try_void and Solidus. Further work is required to address these issues.
df6af3a to
152dd3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #150
The tests cover the following cases:
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: