Skip to content

Conversation

@mamhoff
Copy link
Contributor

@mamhoff mamhoff commented May 29, 2025

Summary

In the same spirit as #6245 , which refactored @current_user_roles into a helper method, we do the same for the current_api_user.

Depends on #6245, extracted from #6240.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@mamhoff mamhoff requested a review from a team as a code owner May 29, 2025 10:01
@github-actions github-actions bot added the changelog:solidus_api Changes to the solidus_api gem label May 29, 2025
@mamhoff mamhoff force-pushed the current-api-user-helper branch from 2efcacd to 48fe06d Compare May 29, 2025 12:55
@tvdeyen tvdeyen added this to the 4.6 milestone May 29, 2025
In the same spirit as the previous commit, which refactored
`@current_user_roles` into a helper method, we do the same for the
`current_api_user`.

Also fixes a spec that previously compared a user object with a string,
hoping them not to be identical (they never would be).
@tvdeyen tvdeyen force-pushed the current-api-user-helper branch from 48fe06d to 5dad30f Compare May 30, 2025 09:29
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.82%. Comparing base (f0a7456) to head (5dad30f).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
api/app/controllers/spree/api/base_controller.rb 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6246      +/-   ##
==========================================
- Coverage   88.82%   88.82%   -0.01%     
==========================================
  Files         850      850              
  Lines       18334    18337       +3     
==========================================
+ Hits        16286    16288       +2     
- Misses       2048     2049       +1     

☔ 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.

@tvdeyen tvdeyen merged commit c410165 into solidusio:main May 30, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_api Changes to the solidus_api gem

Projects

Development

Successfully merging this pull request may close these issues.

3 participants