diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-10 21:46:51 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-10 21:46:51 +0100 |
commit | eee3534b1a5614d824a34e2c761faaeab07c2eb4 (patch) | |
tree | 4de249ed1a91c151200d7d09355f3ba3e2bd44f8 /activerecord/CHANGELOG.md | |
parent | 688996da7b25080a1a2ef74f5b4789f3e5eb670d (diff) | |
download | rails-eee3534b1a5614d824a34e2c761faaeab07c2eb4.tar.gz rails-eee3534b1a5614d824a34e2c761faaeab07c2eb4.tar.bz2 rails-eee3534b1a5614d824a34e2c761faaeab07c2eb4.zip |
Add `parsed_body` to spare writing out parsing routines.
When testing:
```ruby
post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json
```
It's common to want to make assertions on the response body. Perhaps the
server responded with JSON, so you write `JSON.parse(response.body)`.
But that gets tedious real quick.
Instead add `parsed_body` which will automatically parse the reponse
body as what the last request was encoded `as`.
Diffstat (limited to 'activerecord/CHANGELOG.md')
0 files changed, 0 insertions, 0 deletions