-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip] #25450
Conversation
3787a09
to
75f9696
Compare
This needs backport too. |
75f9696
to
81c5c76
Compare
* `flash`: option with a hash of flash values. | ||
* `env`: for customizing the request environment as needed. | ||
|
||
* `xhr`: weather the request is Ajax request or not. Can be set to true for marking the request as Ajax. |
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.
You have a typo here, should be "whether the request"
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.
Oops. Fixed :)
81c5c76
to
60b3839
Compare
|
||
```ruby | ||
get(:show, params: { id: 12 }, session: { user_id: 5 }) | ||
get(:show, params: { id: 12 }), as: :json |
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.
Closing paren is set wrong :)
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.
How does the as option make sense on get requests?
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.
@kaspth 👍 Updated example with headers.
60b3839
to
1013989
Compare
@@ -695,30 +695,34 @@ end | |||
In the `test_should_get_index` test, Rails simulates a request on the action called `index`, making sure the request was successful | |||
and also ensuring that the right response body has been generated. | |||
|
|||
The `get` method kicks off the web request and populates the results into the `@response`. It accepts 4 arguments: | |||
The `get` method kicks off the web request and populates the results into the `@response`. It can accept upto 6 arguments: |
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.
"up to" should be two words
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.
Thanks, updated
… controller tests [ci skip] - Fixes rails#25394.
1013989
to
16283e7
Compare
Nice 👍 |
@kaspth We need to backport it too :) |
Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip]
…uide Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip]
@prathamesh-sonpatki doh, nice catch! Backported to 5-0-stable @ 91f7779, 5-0-0 @ 662be0c 😁 |
Ah, this didn't need to go in to 5-0-0. I was a little too quick there. |
r? @eileencodes