Sha256: 52245fc33fd2f523d1e999922510eb22998f3d6a6a35bb5855f335d5c13189e1
Contents?: true
Size: 730 Bytes
Versions: 21
Compression:
Stored size: 730 Bytes
Contents
require File.expand_path('../../test_helper', __FILE__) module Stripe class RecipientTest < Test::Unit::TestCase should "recipient should be retrievable" do @mock.expects(:get).once.returns(make_response(make_recipient)) r = Stripe::Recipient.retrieve('test_recipient') assert_equal 'rp_test_recipient', r.id end should "recipient should be updateable" do @mock.expects(:post).once. with("https://api.stripe.com/v1/recipients/test_recipient", nil, "metadata[foo]=bar"). returns(make_response(make_recipient(metadata: {foo: 'bar'}))) r = Stripe::Recipient.update('test_recipient', metadata: {foo: 'bar'}) assert_equal 'bar', r.metadata['foo'] end end end
Version data entries
21 entries across 21 versions & 1 rubygems