Update create params for methods that were previously too forgiving

This commit is contained in:
Brandur 2017-02-02 16:50:23 -08:00
parent b1adb9a1e9
commit 6b2e3c1eb5
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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