mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-12-08 00:01:02 -05:00
Update create params for methods that were previously too forgiving
This commit is contained in:
parent
b1adb9a1e9
commit
6b2e3c1eb5
@ -18,7 +18,12 @@ module Stripe
|
||||
end
|
||||
|
||||
should "be creatable" do
|
||||
coupon = Stripe::Coupon.create(:charge => API_FIXTURES[:charge][:id])
|
||||
coupon = Stripe::Coupon.create(
|
||||
percent_off: 25,
|
||||
duration: 'repeating',
|
||||
duration_in_months: 3,
|
||||
id: '25OFF'
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/coupons"
|
||||
assert coupon.kind_of?(Stripe::Coupon)
|
||||
end
|
||||
|
||||
@ -18,7 +18,13 @@ module Stripe
|
||||
end
|
||||
|
||||
should "be creatable" do
|
||||
plan = Stripe::Plan.create(:metadata => {})
|
||||
plan = Stripe::Plan.create(
|
||||
amount: 5000,
|
||||
interval: "month",
|
||||
name: "Sapphire elite",
|
||||
currency: "usd",
|
||||
id: "sapphire-elite"
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/plans"
|
||||
assert plan.kind_of?(Stripe::Plan)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user