module SharkOnLambda::RSpec::ResponseHelpers
Public Instance Methods
jsonapi_attributes()
click to toggle source
# File lib/shark_on_lambda/rspec/response_helpers.rb, line 6 def jsonapi_attributes jsonapi_data.fetch(:attributes, {}) end
jsonapi_data()
click to toggle source
# File lib/shark_on_lambda/rspec/response_helpers.rb, line 10 def jsonapi_data parsed_body.fetch(:data, {}) end
jsonapi_errors()
click to toggle source
# File lib/shark_on_lambda/rspec/response_helpers.rb, line 14 def jsonapi_errors parsed_body.fetch(:errors, []) end
Private Instance Methods
parsed_body()
click to toggle source
# File lib/shark_on_lambda/rspec/response_helpers.rb, line 20 def parsed_body @parsed_body ||= JSON.parse(response.body).with_indifferent_access end