Fix admin promotions controller#5943
Merged
tvdeyen merged 2 commits intosolidusio:mainfrom Nov 19, 2024
Merged
Conversation
The `authorization_subject` method from `solidus_admin` assumes that all models are in the `Spree` namespace.
0e66bf5 to
77126cc
Compare
tvdeyen
reviewed
Nov 19, 2024
Member
tvdeyen
left a comment
There was a problem hiding this comment.
Thanks 👍🏻
The spec helper name is a bit misleading, though
This controller still did not know how what to authorize against, and wanted to visit a URL that doesn't exist when clicking on a promotion. This also changes at least the name of each promotion to be a link element that can easily be targeted with Capybara and works with all major browsers.
77126cc to
2eccd6d
Compare
kennyadsl
approved these changes
Nov 19, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5943 +/- ##
=======================================
Coverage 89.54% 89.54%
=======================================
Files 782 782
Lines 17991 17997 +6
=======================================
+ Hits 16110 16116 +6
Misses 1881 1881 ☔ View full report in Codecov by Sentry. |
Member
|
Backport after #6016 |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
This was referenced Dec 6, 2024
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
Fix admin promotions index controller: visit the correct URL on row click, and authorize against the right model.