-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move legacy integration specs #5773
Merged
tvdeyen
merged 12 commits into
solidusio:main
from
mamhoff:move-legacy-integration-specs
Jun 4, 2024
Merged
Move legacy integration specs #5773
tvdeyen
merged 12 commits into
solidusio:main
from
mamhoff:move-legacy-integration-specs
Jun 4, 2024
Conversation
This file contains 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
39f879b
to
ebdfe34
Compare
This changes the order spec in core to rely on the stubbed null promotion system. The specs for the legacy promotion system have been moved to the legacy_promotions gem.
The one example here relies on the legacy promo system.
With the upcoming change to using the Null promotion system, these specs will start failing, because they really test another classes implementation (that of the legacy promotions configuration object). Just test for equality instead.
These specs test the entire promotion system, not just the `CreateQuantityAdjustments` class. Moving to the legacy_promotions gem.
These specs test the entire promotion system, not just this unit.
This one spec should not live here.
This change lets this spec pass even if the promotion configuration object changes. It currently prints deprecation warnings, but it will soon be moved over to the legacy_promotions gem.
These specs test not the promotion code model in isolation, but the entire promotion system's functioning. Moving to solidus_legacy_promotions.
This promotion handler only handles promotions with the free shipping action, and that is configured in the legacy promotion configuration. Stub it, so that tests pass even with a Null promotion configuration configured.
While this file looks like a unit test, it's entirely an integration test for the whole promotion system. Moving as-is.
ebdfe34
to
ad311f5
Compare
tvdeyen
approved these changes
Jun 4, 2024
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
This PR moves all specs that test the entire legacy promotion system to the legacy_promotions gem. This way, the unit tests for individual classes in that system are still green if we move core to use the
NullPromotionConfiguration
.