diff --git a/spec/support/api_helper.rb b/spec/support/api_helper.rb index c41a7cfd81..4319f032ed 100644 --- a/spec/support/api_helper.rb +++ b/spec/support/api_helper.rb @@ -3,15 +3,7 @@ module OpenFoodNetwork module ApiHelper def json_response - json_response = JSON.parse(response.body) - case json_response - when Hash - json_response.with_indifferent_access - when Array - json_response.map(&:with_indifferent_access) - else - json_response - end + response.parsed_body end def json_response_ids