Created
September 29, 2016 11:55
-
-
Save tkanov/8eb67e97d8a3cde9725e52aed7827a56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_should_get_something | |
get :show, id: 1114, format: 'json' | |
expected = { | |
'something' => 'anything', | |
'index' => '1', | |
'attributes' => [ | |
{ 'name' => 'guns', 'value' => 'roses' }, | |
{ 'name' => 'red', 'value' => 'hot' }, | |
{ 'name' => 'carpet', 'value' => 'sofa' }, | |
{ 'name' => 'sys', 'value' => 'log' } | |
], | |
'where' => 'am_i', | |
} | |
assert_equal expected, JSON.parse(response.body) | |
assert_response :success | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment