Sha256: fd325d9932b9205add3df21f34610eba606eff7bbd45bb21189874fa4a30a03d

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

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 "cardholder_name" do
    it "returns Apple pay card cardholder name" do
      Braintree::ApplePayCard._new(:gateway, cardholder_name: "John Miller").cardholder_name.should == "John Miller"
    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

1 entries across 1 versions & 1 rubygems

Version Path
braintree-4.9.0 spec/unit/braintree/apple_pay_card_spec.rb