mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-02 00:00:35 -04:00
Follows the path established in 2d75c8f by porting the rest of stripe-ruby's tests over to OpenAPI. There are a few other changes here where I've removed some tests that are duplicated or don't make much sense, or reorganized how we test certain things, but this commit is largely the same migration operation applied in bulk a few dozen test suites.
22 lines
740 B
Ruby
22 lines
740 B
Ruby
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
module Stripe
|
|
class BitcoinTransactionTest < Test::Unit::TestCase
|
|
FIXTURE = API_FIXTURES.fetch(:bitcoin_transaction)
|
|
|
|
should "be listable" do
|
|
transactions = Stripe::BitcoinTransaction.list
|
|
assert_requested :get, "#{Stripe.api_base}/v1/bitcoin/transactions"
|
|
assert transactions.data.kind_of?(Array)
|
|
assert transactions.first.kind_of?(Stripe::BitcoinTransaction)
|
|
end
|
|
|
|
should "be retrievable" do
|
|
transaction = Stripe::BitcoinTransaction.retrieve(FIXTURE[:id])
|
|
assert_requested :get,
|
|
"#{Stripe.api_base}/v1/bitcoin/transactions/#{FIXTURE[:id]}"
|
|
assert transaction.kind_of?(Stripe::BitcoinTransaction)
|
|
end
|
|
end
|
|
end
|