Sha256: ec6bf24aa7e84c7ec4049e38e4fb2599951515899a4ad2973afc65bce91d1187

Contents?: true

Size: 579 Bytes

Versions: 9

Compression:

Stored size: 579 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

describe Braintree::ErrorCodes do
  describe Braintree::ErrorCodes::CreditCard do
    it "returns CardholderNameIsTooLong when cardholder name is too long" do
      result = Braintree::Customer.create(
        :credit_card => {
          :cardholder_name => "x" * 256
        },
      )
      expect(result.success?).to eq(false)
      expect(result.errors.for(:customer).for(:credit_card).map { |e| e.code }).to \
        include(Braintree::ErrorCodes::CreditCard::CardholderNameIsTooLong)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.22.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.21.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.20.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.19.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.18.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.17.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.16.0 spec/integration/braintree/error_codes_spec.rb
braintree-4.15.0 spec/integration/braintree/error_codes_spec.rb