-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add options for default sorting #1644
Conversation
end | ||
|
||
it "supports default sorting overrides" do | ||
allow_any_instance_of(Admin::CustomersController).to(receive_messages( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we can do this without using allow_any_instance_of
? Perhaps by creating another controller subclass inside the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced it with an anonymous class. Does this help clarify the test or are you thinking something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just one nitpick about private vs public.
Uh, I didn't realise that the tests were failing. Any idea of what's going on? |
Figured out what was going on. Replacing the |
CI failures are unrelated to this change. It's regarding CVE security issue with gems. |
@jbennett - Do you mind rebasing on top of master? It should fix the CVE warning. |
only actions should be public in a controller
Changing @controller directly messes up other tests. This was messed in my test runs due to random ordering.
This matches the original default values
Co-authored-by: Pablo Brasero <pablo@pablobm.com>
Rebased and passing 👍🏻 |
Thanks for your work here! |
Provide methods to override the default ordering attribute and direction.
Reference: #442