mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-08-21 00:00:42 -04:00
Update stripe tests for newer API format.
This commit is contained in:
parent
73a884f202
commit
5fcaa49495
@ -57,7 +57,7 @@ def test_customer(params={})
|
||||
end
|
||||
|
||||
def test_customer_array
|
||||
[test_customer, test_customer, test_customer]
|
||||
{:data => [test_customer, test_customer, test_customer]}
|
||||
end
|
||||
|
||||
def test_charge(params={})
|
||||
@ -84,7 +84,7 @@ def test_charge(params={})
|
||||
end
|
||||
|
||||
def test_charge_array
|
||||
[test_charge, test_charge, test_charge]
|
||||
{:data => [test_charge, test_charge, test_charge]}
|
||||
end
|
||||
|
||||
def test_card(params={})
|
||||
|
@ -153,7 +153,7 @@ class TestStripeRuby < Test::Unit::TestCase
|
||||
|
||||
should "loading all of an APIResource should return an array of recursively instantiated objects" do
|
||||
@mock.expects(:get).once.returns(test_response(test_charge_array))
|
||||
c = Stripe::Charge.all
|
||||
c = Stripe::Charge.all.data
|
||||
assert c.kind_of? Array
|
||||
assert c[0].kind_of? Stripe::Charge
|
||||
assert c[0].card.kind_of?(Stripe::StripeObject) && c[0].card.object == 'card'
|
||||
@ -163,7 +163,7 @@ class TestStripeRuby < Test::Unit::TestCase
|
||||
|
||||
should "charges should be listable" do
|
||||
@mock.expects(:get).once.returns(test_response(test_charge_array))
|
||||
c = Stripe::Charge.all
|
||||
c = Stripe::Charge.all.data
|
||||
assert c.kind_of? Array
|
||||
end
|
||||
|
||||
@ -223,7 +223,7 @@ class TestStripeRuby < Test::Unit::TestCase
|
||||
|
||||
should "customers should be listable" do
|
||||
@mock.expects(:get).once.returns(test_response(test_customer_array))
|
||||
c = Stripe::Customer.all
|
||||
c = Stripe::Customer.all.data
|
||||
assert c.kind_of? Array
|
||||
assert c[0].kind_of? Stripe::Customer
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user