Sha256: 0838192306b52ec1ea55360c2778956042015d7dbe1ead2831afa3a2e82850b2
Contents?: true
Size: 809 Bytes
Versions: 4
Compression:
Stored size: 809 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' require 'drillbit/errors/invalid_api_request' module Drillbit module Errors RSpec.describe InvalidApiRequest do let(:error) { InvalidApiRequest.new } it 'has a status of 400' do expect(error.http_status).to eql 400 end it 'has a code' do expect(error.code).to eql 'errors.invalid_api_request' end it 'can output the detail' do expect(error.detail).to eql 'The accept header that you passed in the ' \ 'request cannot be parsed, please refer to ' \ 'the documentation to verify.' end it 'can output the source' do error = InvalidApiRequest.new accept_header: 'foo' expect(error.source).to eql(accept_header: 'foo') end end end end
Version data entries
4 entries across 4 versions & 1 rubygems