mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-09-27 00:01:20 -04:00
Fix some parameters being sent in tests
I found a bug recently in stripe-mock which causes it not to actually be validating that parameters not in the spec are not being sent (the actual Stripe API does check for this). After applying a fix, I found that stripe-ruby's test suite no longer passes against it, and the reason is that there are some subtle mistakes throughout. This patch corrects them to be in line with what the API actually expects.
This commit is contained in:
parent
e8b272653e
commit
ed2a0f066d
@ -46,7 +46,7 @@ module Stripe
|
||||
context "#create_subscription" do
|
||||
should "create a new subscription" do
|
||||
customer = Stripe::Customer.retrieve("cus_123")
|
||||
subscription = customer.create_subscription(plan: "silver")
|
||||
subscription = customer.create_subscription(items: [{ plan: "silver" }])
|
||||
assert subscription.is_a?(Stripe::Subscription)
|
||||
end
|
||||
end
|
||||
|
@ -41,7 +41,7 @@ module Stripe
|
||||
context "#pay" do
|
||||
should "pay an order" do
|
||||
order = Stripe::Order.retrieve("or_123")
|
||||
order = order.pay(token: "tok_123")
|
||||
order = order.pay(source: "tok_123")
|
||||
assert order.is_a?(Stripe::Order)
|
||||
end
|
||||
end
|
||||
@ -49,7 +49,7 @@ module Stripe
|
||||
context "#return_order" do
|
||||
should "return an order" do
|
||||
order = Stripe::Order.retrieve("or_123")
|
||||
order = order.return_order(orders: [
|
||||
order = order.return_order(items: [
|
||||
{ parent: "sku_123" },
|
||||
])
|
||||
assert order.is_a?(Stripe::OrderReturn)
|
||||
|
@ -22,7 +22,6 @@ module Stripe
|
||||
|
||||
should "be creatable" do
|
||||
item = Stripe::SubscriptionItem.create(
|
||||
item: "silver",
|
||||
plan: "sapphire-elite",
|
||||
quantity: 3,
|
||||
subscription: "sub_123"
|
||||
|
Loading…
x
Reference in New Issue
Block a user