Sha256: 9f276c2936f46bd992ddb3df6f821c1024846d51a80e9c9de74db6bb94d6a278

Contents?: true

Size: 1009 Bytes

Versions: 34

Compression:

Stored size: 1009 Bytes

Contents

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

describe Braintree::ApplePayCard do
  describe "bin" do
    it "returns Apple pay card bin" do
      Braintree::ApplePayCard._new(:gateway, bin: '411111').bin.should == '411111'
    end
  end

  describe "default?" do
    it "is true if the Apple pay card is the default payment method for the customer" do
      Braintree::ApplePayCard._new(:gateway, :default => true).default?.should == true
    end

    it "is false if the Apple pay card is not the default payment methodfor the customer" do
      Braintree::ApplePayCard._new(:gateway, :default => false).default?.should == false
    end
  end

  describe "expired?" do
    it "is true if the Apple pay card is expired" do
      Braintree::ApplePayCard._new(:gateway, :expired => true).expired?.should == true
    end

    it "is false if the Apple pay card is not expired" do
      Braintree::ApplePayCard._new(:gateway, :expired => false).expired?.should == false
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
braintree-3.3.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-3.2.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-3.1.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-3.0.1 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.104.1 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.104.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.103.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.102.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.101.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.100.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.99.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.98.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.97.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.96.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.95.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.94.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.93.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.92.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.91.0 spec/unit/braintree/apple_pay_card_spec.rb
braintree-2.90.0 spec/unit/braintree/apple_pay_card_spec.rb