Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rails6/fr/chapter09-optimization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ class Api::V1::OrdersControllerTest < ActionDispatch::IntegrationTest
get api_v1_orders_url, headers: { Authorization: JsonWebToken.encode(user_id: @order.user_id) }, as: :json
assert_response :success

json_response = JSON.parse(response.body)
assert_equal @order.user.orders.count, json_response['data'].count
json_response = JSON.parse(response.body, symbolize_names: true)
assert_equal @order.user.orders.count, json_response[:data].count
assert_not_nil json_response.dig(:links, :first)
assert_not_nil json_response.dig(:links, :last)
assert_not_nil json_response.dig(:links, :prev)
Expand Down