Skip to content
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

Merged
merged 1 commit into from
Jun 21, 2016

Conversation

prathamesh-sonpatki
Copy link
Member

@prathamesh-sonpatki
Copy link
Member Author

This needs backport too.

@prathamesh-sonpatki prathamesh-sonpatki changed the title Fix the docs for supported keyword for Rails 5 style integration controller tests [ci skip] Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip] Jun 20, 2016
* `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.
Copy link
Member

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"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Fixed :)


```ruby
get(:show, params: { id: 12 }, session: { user_id: 5 })
get(:show, params: { id: 12 }), as: :json
Copy link
Contributor

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 :)

Copy link
Contributor

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?

Copy link
Member Author

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.

@@ -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:
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated

@kaspth kaspth merged commit 7ad8093 into rails:master Jun 21, 2016
@kaspth
Copy link
Contributor

kaspth commented Jun 21, 2016

Nice 👍

@prathamesh-sonpatki prathamesh-sonpatki deleted the fix-testing-guide branch June 21, 2016 08:52
@prathamesh-sonpatki
Copy link
Member Author

@kaspth We need to backport it too :)

kaspth added a commit that referenced this pull request Jun 21, 2016
Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip]
kaspth added a commit to kaspth/rails that referenced this pull request Jun 21, 2016
…uide

Fix the docs for supported keyword args or Rails 5 style integration controller tests [ci skip]
@kaspth
Copy link
Contributor

kaspth commented Jun 21, 2016

@prathamesh-sonpatki doh, nice catch! Backported to 5-0-stable @ 91f7779, 5-0-0 @ 662be0c 😁

@kaspth
Copy link
Contributor

kaspth commented Jun 21, 2016

Ah, this didn't need to go in to 5-0-0. I was a little too quick there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants