Class: ApiValidator::Status
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ApiValidator::Base
Instance Method Details
#validate(response) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/api-validator/status.rb', line 4 def validate(response) response_status = response.status _failed_assertions = failed_assertions(response_status) super.merge( :key => :response_status, :failed_assertions => _failed_assertions.map(&:to_hash), :diff => diff(response_status, _failed_assertions), :valid => _failed_assertions.empty? ) end |