|
@@ -11,9 +11,9 @@ class Api::V1::UsersControllerTest < ActionDispatch::IntegrationTest
|
11
|
11
|
assert_response :success
|
12
|
12
|
# Test to ensure response contains the correct email
|
13
|
13
|
|
14
|
|
- json_response = JSON.parse(self.response.body)
|
15
|
|
- assert_equal @user.email, json_response['data']['attributes']['email']
|
16
|
|
- assert_equal @user.username, json_response['data']['attributes']['username']
|
|
14
|
+ json_response = JSON.parse(self.response.body, symbolize_names: true)
|
|
15
|
+ assert_equal @user.email, json_response.dig(:data, :attributes, :email)
|
|
16
|
+ assert_equal @user.username, json_response.dig(:data, :attributes, :username)
|
17
|
17
|
end
|
18
|
18
|
|
19
|
19
|
#CREATE
|