Sha256: cd8d370a21913369251e82219756cb050bcc9af25bf30040ed9479f82dd2aa15

Contents?: true

Size: 1 KB

Versions: 46

Compression:

Stored size: 1 KB

Contents

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

module Stripe
  class BitcoinTransactionTest < Test::Unit::TestCase
    TEST_ID = "btctxn_test_transaction".freeze

    should "retrieve should retrieve bitcoin receiver" do
      @mock.expects(:get).
        with("#{Stripe.api_base}/v1/bitcoin/transactions/#{TEST_ID}", nil, nil).
        once.
        returns(make_response(make_bitcoin_transaction))
      receiver = Stripe::BitcoinTransaction.retrieve(TEST_ID)
      assert_equal TEST_ID, receiver.id
    end

    should "all should list bitcoin transactions" do
      @mock.expects(:get).
        with("#{Stripe.api_base}/v1/bitcoin/transactions", nil, nil).
        once.
        returns(make_response(make_bitcoin_transaction_array))
      transactions = Stripe::BitcoinTransaction.list
      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

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
stripe-1.58.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.57.1 test/stripe/bitcoin_transaction_test.rb
stripe-1.57.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.56.2 test/stripe/bitcoin_transaction_test.rb
stripe-1.56.1 test/stripe/bitcoin_transaction_test.rb
stripe-1.56.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.55.1 test/stripe/bitcoin_transaction_test.rb
stripe-1.55.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.54.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.53.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.52.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.51.1 test/stripe/bitcoin_transaction_test.rb
stripe-1.51.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.50.1 test/stripe/bitcoin_transaction_test.rb
stripe-1.50.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.49.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.48.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.47.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.46.0 test/stripe/bitcoin_transaction_test.rb
stripe-1.45.0 test/stripe/bitcoin_transaction_test.rb