Skip to content

Use FactoryBot factories#6311

Closed
benjaminwil wants to merge 1 commit intosolidusio:mainfrom
SuperGoodSoft:dont-use-mock-model
Closed

Use FactoryBot factories#6311
benjaminwil wants to merge 1 commit intosolidusio:mainfrom
SuperGoodSoft:dont-use-mock-model

Conversation

@benjaminwil
Copy link
Contributor

Summary

In our work on the in-memory order updater (#5872), we updated some tests to have more realistic test setup. This is not dependent on that work, so we are splitting it into its own small pull request.

Instead of instantiating new records directly or using mock_model, we can use factories, which are more realistically set up objects.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

Instead of instantiating new records directly or using `mock_model`, we
can use factories, which are more realistically set up objects.

Co-Authored-By: benjamin wil <benjamin@super.gd>
Co-Authored-By: Senem Soy <senem@super.gd>
Co-Authored-By: Alistair Norman <alistair@super.gd>
@benjaminwil benjaminwil requested a review from a team as a code owner July 29, 2025 17:01
@github-actions github-actions bot added the changelog:solidus_promotions Changes to the solidus_promotions gem label Jul 29, 2025
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@424f284). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6311   +/-   ##
=======================================
  Coverage        ?   89.31%           
=======================================
  Files           ?      959           
  Lines           ?    20116           
  Branches        ?        0           
=======================================
  Hits            ?    17967           
  Misses          ?     2149           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benjaminwil
Copy link
Contributor Author

Sorry, opened this too soon. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_promotions Changes to the solidus_promotions gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant