Sha256: b05a36ed7e41f5befe10de2d0ca7db82ccdbdaf97199ba4a97a3aa6aef5d63a9

Contents?: true

Size: 953 Bytes

Versions: 34

Compression:

Stored size: 953 Bytes

Contents

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

module Stripe
  class TransferTest < Test::Unit::TestCase
    should "retrieve should retrieve transfer" do
      @mock.expects(:get).once.returns(make_response(make_transfer))
      transfer = Stripe::Transfer.retrieve('tr_test_transfer')
      assert_equal 'tr_test_transfer', transfer.id
    end

    should "create should create a transfer" do
      @mock.expects(:post).once.returns(make_response(make_transfer))
      transfer = Stripe::Transfer.create
      assert_equal "tr_test_transfer", transfer.id
    end

    should "cancel should cancel a transfer" do
      @mock.expects(:get).once.returns(make_response(make_transfer))
      transfer = Stripe::Transfer.retrieve('tr_test_transfer')

      @mock.expects(:post).once.with('https://api.stripe.com/v1/transfers/tr_test_transfer/cancel', nil, '').returns(make_response(make_canceled_transfer))
      transfer.cancel
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
stripe-1.43.1 test/stripe/transfer_test.rb
stripe-1.43.0 test/stripe/transfer_test.rb
stripe-1.42.0 test/stripe/transfer_test.rb
stripe-1.41.0 test/stripe/transfer_test.rb
stripe-1.40.0 test/stripe/transfer_test.rb
stripe-1.39.0 test/stripe/transfer_test.rb
stripe-1.38.0 test/stripe/transfer_test.rb
stripe-1.37.0 test/stripe/transfer_test.rb
stripe-1.36.2 test/stripe/transfer_test.rb
stripe-1.36.1 test/stripe/transfer_test.rb
stripe-1.36.0 test/stripe/transfer_test.rb
stripe-1.35.1 test/stripe/transfer_test.rb
stripe-1.35.0 test/stripe/transfer_test.rb
stripe-1.34.0 test/stripe/transfer_test.rb
stripe-1.33.1 test/stripe/transfer_test.rb
stripe-1.33.0 test/stripe/transfer_test.rb
stripe-1.32.1 test/stripe/transfer_test.rb
stripe-1.32.0 test/stripe/transfer_test.rb
stripe-1.31.0 test/stripe/transfer_test.rb
stripe-1.30.3 test/stripe/transfer_test.rb