Module: SharkOnLambda::RSpec::ResponseHelpers

Included in:
Helpers
Defined in:
lib/shark_on_lambda/rspec/response_helpers.rb

Instance Method Summary collapse

Instance Method Details

#jsonapi_attributesObject



6
7
8
# File 'lib/shark_on_lambda/rspec/response_helpers.rb', line 6

def jsonapi_attributes
  jsonapi_data.fetch(:attributes, {})
end

#jsonapi_dataObject



10
11
12
# File 'lib/shark_on_lambda/rspec/response_helpers.rb', line 10

def jsonapi_data
  parsed_body.fetch(:data, {})
end

#jsonapi_errorsObject



14
15
16
# File 'lib/shark_on_lambda/rspec/response_helpers.rb', line 14

def jsonapi_errors
  parsed_body.fetch(:errors, [])
end