mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-05 00:02:50 -04:00
stripe-mock 0.4.0 comes with the up-to-date exchange rates API. Here we bump the required version and remove the manual exchange rate stubbing in stripe-ruby's test suite.
19 lines
593 B
Ruby
19 lines
593 B
Ruby
require File.expand_path("../../test_helper", __FILE__)
|
|
|
|
module Stripe
|
|
class ExchangeRateTest < Test::Unit::TestCase
|
|
should "be listable" do
|
|
list_rates = Stripe::ExchangeRate.list
|
|
assert_requested :get, "#{Stripe.api_base}/v1/exchange_rates"
|
|
assert list_rates.data.is_a?(Array)
|
|
assert list_rates.data.first.is_a?(Stripe::ExchangeRate)
|
|
end
|
|
|
|
should "be retrievable" do
|
|
rates = Stripe::ExchangeRate.retrieve("usd")
|
|
assert_requested :get, "#{Stripe.api_base}/v1/exchange_rates/usd"
|
|
assert rates.is_a?(Stripe::ExchangeRate)
|
|
end
|
|
end
|
|
end
|