Skip to content
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
merged 12 commits into from
Jun 4, 2024

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 4, 2024

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.

@mamhoff mamhoff requested a review from a team as a code owner June 4, 2024 06:32
@mamhoff mamhoff force-pushed the move-legacy-integration-specs branch from 39f879b to ebdfe34 Compare June 4, 2024 06:43
mamhoff added 12 commits June 4, 2024 09:41
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.
@mamhoff mamhoff force-pushed the move-legacy-integration-specs branch from ebdfe34 to ad311f5 Compare June 4, 2024 07:42
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Jun 4, 2024
@tvdeyen tvdeyen enabled auto-merge June 4, 2024 07:46
@tvdeyen tvdeyen merged commit 7b193b3 into solidusio:main Jun 4, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants