mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-05 00:02:50 -04:00
Corrects the paths at which the client looks for Bitcoin transactions and adds a small test suite to check these results. Fixes stripe/stripe-ruby#236.
22 lines
826 B
Ruby
22 lines
826 B
Ruby
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
module Stripe
|
|
class BitcoinTransactionTest < Test::Unit::TestCase
|
|
should "retrieve should retrieve bitcoin receiver" do
|
|
@mock.expects(:get).once.returns(make_response(make_bitcoin_transaction))
|
|
receiver = Stripe::BitcoinTransaction.retrieve('bttxn_test_transaction')
|
|
assert_equal 'btctxn_test_transaction', receiver.id
|
|
end
|
|
|
|
should "all should list bitcoin transactions" do
|
|
@mock.expects(:get).once.returns(make_response(make_bitcoin_transaction_array))
|
|
transactions = Stripe::BitcoinTransaction.all
|
|
assert_equal 3, transactions.data.length
|
|
assert transactions.data.kind_of? Array
|
|
transactions.each do |transaction|
|
|
assert transaction.kind_of?(Stripe::BitcoinTransaction)
|
|
end
|
|
end
|
|
end
|
|
end
|