Serialized users

This commit is contained in:
Lou 2021-04-27 17:33:55 +02:00
commit d0fe04530e
3 changed files with 9 additions and 5 deletions

View file

@ -11,7 +11,7 @@ class Api::V1::UsersControllerTest < ActionDispatch::IntegrationTest
assert_response :success
# Test to ensure response contains the correct email
json_response = JSON.parse(self.response.body)
assert_equal @user.email, json_response['email']
assert_equal @user.email, json_response['data']['attributes']['email']
end
#CREATE