Sha256: 10d8a2c76815138af4f4d90ce12c1988f2ac04af585b7a6b70e767a35d8e55a2

Contents?: true

Size: 678 Bytes

Versions: 49

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

describe 'ChargeBee::InvalidRequestError' do
  let(:invalid_request_json) do
    {
        message:  'id: The value chargebee_account is already present.',
        type: 'invalid_request',
        api_error_code: 'duplicate_entry',
        param: 'id',
        error_code: 'param_not_unique',
        error_msg: 'The value chargebee_account is already present.',
        error_param: 'id',
        http_status_code: 400
    }
  end

  it "provide message from error api response" do
    error = ChargeBee::InvalidRequestError.new(400, invalid_request_json)
    expect(error.message).to eq 'id: The value chargebee_account is already present.'
  end

end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
chargebee-2.49.0 spec/errors_spec.rb
chargebee-2.48.0 spec/errors_spec.rb
chargebee-2.47.1 spec/errors_spec.rb
chargebee-2.47.0 spec/errors_spec.rb
chargebee-2.47.0.beta.1 spec/errors_spec.rb
chargebee-2.46.0 spec/errors_spec.rb
chargebee-2.45.0 spec/errors_spec.rb
chargebee-2.44.1 spec/errors_spec.rb
chargebee-2.44.0 spec/errors_spec.rb
chargebee-2.43.0 spec/errors_spec.rb
chargebee-2.42.0 spec/errors_spec.rb
chargebee-2.41.0 spec/errors_spec.rb
chargebee-2.40.0 spec/errors_spec.rb
chargebee-2.38.1 spec/errors_spec.rb
chargebee-2.38.0 spec/errors_spec.rb
chargebee-2.37.1 spec/errors_spec.rb
chargebee-2.37.0 spec/errors_spec.rb
chargebee-2.36.2 spec/errors_spec.rb
chargebee-2.36.1 spec/errors_spec.rb
chargebee-2.36.0 spec/errors_spec.rb