mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-07 00:05:33 -04:00
20 lines
689 B
Ruby
20 lines
689 B
Ruby
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
module Stripe
|
|
class RecipientTest < Test::Unit::TestCase
|
|
should "recipient should be retrievable" do
|
|
stub_request(:get, "#{Stripe.api_base}/v1/recipients/test_recipient").
|
|
to_return(body: make_response(make_recipient))
|
|
_ = Stripe::Recipient.retrieve('test_recipient')
|
|
end
|
|
|
|
should "recipient should be updateable" do
|
|
stub_request(:post, "#{Stripe.api_base}/v1/recipients/test_recipient").
|
|
with(body: { metadata: { key: "value" } }).
|
|
to_return(body: make_response(make_refund))
|
|
_ = Stripe::Recipient.update('test_recipient', metadata: { key: 'value' })
|
|
end
|
|
end
|
|
end
|
|
|