Sha256: c0e52eb6a22956db3372149511d8daf7c6a875d11bb21704541cbd2169c9db75

Contents?: true

Size: 1.38 KB

Versions: 54

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

54 entries across 54 versions & 1 rubygems

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