Sha256: b08687e663d59d224af4e5fc60a1aff6320a2ae4b36b517dac8ba07399386c88

Contents?: true

Size: 1.38 KB

Versions: 16

Compression:

Stored size: 1.38 KB

Contents

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

describe Braintree::MerchantAccount do
  describe "#inspect" do
    it "is a string representation of the merchant account" do
      account = Braintree::MerchantAccount._new(nil, :id => "merchant_account", :status => "active", :master_merchant_account => nil)

      account.inspect.should == "#<Braintree::MerchantAccount: id: \"merchant_account\", status: \"active\", master_merchant_account: nil>"
    end

    it "handles a master merchant account" do
      account = Braintree::MerchantAccount._new(
        nil,
        :id => "merchant_account",
        :status => "active",
        :master_merchant_account => {:id => "master_merchant_account", :status => "active", :master_merchant_account => nil},
      )

      master_merchant_account = "#<Braintree::MerchantAccount: id: \"master_merchant_account\", status: \"active\", master_merchant_account: nil>"
      account.inspect.should == "#<Braintree::MerchantAccount: id: \"merchant_account\", status: \"active\", master_merchant_account: #{master_merchant_account}>"
    end
  end

  describe "default?" do
    it "is an alias of default" do
      account = Braintree::MerchantAccount._new(nil, :default => false)
      account.default?.should == false
      account = Braintree::MerchantAccount._new(nil, :default => true)
      account.default?.should == true
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
braintree-4.14.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.13.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.12.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.11.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.10.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.9.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.8.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.7.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.6.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.5.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.4.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.3.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.2.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.1.0 spec/unit/braintree/merchant_account_spec.rb
braintree-4.0.0 spec/unit/braintree/merchant_account_spec.rb
braintree-3.4.0 spec/unit/braintree/merchant_account_spec.rb