-
Notifications
You must be signed in to change notification settings - Fork 429
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
Allow setting method when using the test helper #1805
Allow setting method when using the test helper #1805
Conversation
Can you share a real world example/use case? I'd like to understand the use case better before we move forward here. |
Sure thing. We have a component which renders a set of navigation links and highlights the current page. It's implemented by comparing the current request's handler ( There's some challenge in forms with both a Maybe easier to share the actual code, effect, and our current workaround: |
6672224
to
292b21b
Compare
@reeganviljoen From my perspective, I'm expecting this to be ready for review as-is. Based on the discussion at #1805 (comment), I don't have a clear sense that there's a suggested rename, and I'm reasonably happy with the current naming absent any objections. I rebased the branch to resolve merge conflicts that existed due to drift. Happy to make any revisions if suggestions are made! |
@Spone any insights ? |
Looks good to me. Maybe @BlakeWilliams can review this too? @aduth can you please resolve the conflicts? |
292b21b
to
30b6dd2
Compare
Done 👍 |
What are you trying to accomplish?
We have components whose logic varies depending based on the request method, which is not easy to test with the current
with_request_url
helper.What approach did you choose and why?
This adds a new
method
option towith_request_url
. This follows the pattern previously established with thehost
option which exists to similarly specify thehost
associated with the test request.