Sha256: 64e0face4a4b98991cb906e7944974bf980c019f52cfc81527b395a9a890c3f5

Contents?: true

Size: 622 Bytes

Versions: 13

Compression:

Stored size: 622 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)

module Payjp
  class AccountTest < Test::Unit::TestCase
    should "be retrievable" do
      resp = { :email => "test+bindings@pay.jp", :accounts_enabled => ['merchant', 'customer'], :merchant => { :bank_enabled => false } }
      @mock.expects(:get).
        once.
        with("#{Payjp.api_base}/v1/accounts", nil, nil).
        returns(test_response(resp))
      a = Payjp::Account.retrieve
      assert_equal "test+bindings@pay.jp", a.email
      assert_equal ['merchant', 'customer'], a.accounts_enabled
      assert !a.merchant.bank_enabled
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
payjp-0.0.16 test/payjp/account_test.rb
payjp-0.0.14 test/payjp/account_test.rb
payjp-0.0.13 test/payjp/account_test.rb
payjp-0.0.12 test/payjp/account_test.rb
payjp-0.0.10 test/payjp/account_test.rb
payjp-0.0.9 test/payjp/account_test.rb
payjp-0.0.8 test/payjp/account_test.rb
payjp-0.0.7 test/payjp/account_test.rb
payjp-0.0.6 test/payjp/account_test.rb
payjp-0.0.5 test/payjp/account_test.rb
payjp-0.0.4 test/payjp/account_test.rb
payjp-0.0.3 test/payjp/account_test.rb
payjp-0.0.2 test/payjp/account_test.rb