Remove recipient card tests

This commit is contained in:
Tim Maxwell 2017-09-20 14:03:00 -07:00
parent d12fcdb862
commit 0b4ac62eae
3 changed files with 2 additions and 44 deletions

View File

@ -1,6 +1,7 @@
=== 3.4.0 2017-09-20
* Mark legacy Bitcoin API as deprecated, and remove corresponding tests
* Mark recipients API as deprecated, and remove recipient card tests
=== 3.3.2 2017-09-20

View File

@ -1,4 +1,5 @@
module Stripe
# Recipients objects are deprecated. Please use Stripe Connect instead.
class Recipient < APIResource
extend Stripe::APIOperations::Create
include Stripe::APIOperations::Delete

View File

@ -1,44 +0,0 @@
require File.expand_path('../../test_helper', __FILE__)
module Stripe
class RecipientCardTest < Test::Unit::TestCase
setup do
@recipient = Stripe::Recipient.retrieve("rp_123")
end
should "be listable" do
cards = @recipient.cards.list
assert cards.data.kind_of?(Array)
assert cards.data[0].kind_of?(Stripe::Card)
end
should "be creatable" do
card = @recipient.cards.create(
card: "tok_123"
)
assert_requested :post, "#{Stripe.api_base}/v1/recipients/#{@recipient.id}/cards"
assert card.kind_of?(Stripe::Card)
end
should "be deletable" do
card = Stripe::Card.construct_from({
id: "card_123",
recipient: @recipient.id
})
card = card.delete
assert_requested :delete, "#{Stripe.api_base}/v1/recipients/#{@recipient.id}/cards/card_123"
assert card.kind_of?(Stripe::Card)
end
should "be saveable" do
card = Stripe::Card.construct_from({
id: "card_123",
metadata: {},
recipient: @recipient.id
})
card.metadata['key'] = 'value'
card.save
assert_requested :post, "#{Stripe.api_base}/v1/recipients/#{@recipient.id}/cards/card_123"
end
end
end