mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-12-06 00:00:29 -05:00
commit
e751a48bce
@ -7,5 +7,14 @@ module Stripe
|
||||
c = Stripe::Coupon.create
|
||||
assert_equal "co_test_coupon", c.id
|
||||
end
|
||||
|
||||
should "coupons should be updateable" do
|
||||
@mock.expects(:get).once.returns(test_response(test_coupon))
|
||||
@mock.expects(:post).once.returns(test_response(test_coupon))
|
||||
c = Stripe::Coupon.new("test_coupon")
|
||||
c.refresh
|
||||
c.metadata['foo'] = 'bar'
|
||||
c.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -201,7 +201,8 @@ def test_coupon(params={})
|
||||
:duration_in_months => 3,
|
||||
:percent_off => 25,
|
||||
:id => "co_test_coupon",
|
||||
:object => "coupon"
|
||||
:object => "coupon",
|
||||
:metadata => {},
|
||||
}.merge(params)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user