mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-05 00:02:50 -04:00
22 lines
677 B
Ruby
22 lines
677 B
Ruby
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
module Stripe
|
|
class CountrySpecTest < Test::Unit::TestCase
|
|
should "be listable" do
|
|
stub_request(:get, "#{Stripe.api_base}/v1/country_specs").
|
|
to_return(body: JSON.generate(make_country_spec_array))
|
|
c = Stripe::CountrySpec.list
|
|
|
|
assert(c.data.kind_of?(Array))
|
|
assert(c.data[0].kind_of?(Stripe::CountrySpec))
|
|
end
|
|
|
|
should "be retrievable" do
|
|
stub_request(:get, "#{Stripe.api_base}/v1/country_specs/US").
|
|
to_return(body: JSON.generate(make_country_spec))
|
|
s = Stripe::CountrySpec.retrieve('US')
|
|
assert(s.kind_of?(Stripe::CountrySpec))
|
|
end
|
|
end
|
|
end
|