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