Sha256: 9998243dd39afc677e4c43fd2d326edc437b6ed2bc03e5583367ffa856c1246e
Contents?: true
Size: 871 Bytes
Versions: 10
Compression:
Stored size: 871 Bytes
Contents
require 'test_helper' class RemoteRecachePaymentMethodTest < Test::Unit::TestCase def setup @environment = Spreedly::Environment.new(remote_test_environment_key, remote_test_access_secret) end def test_invalid_login assert_invalid_login do |environment| environment.recache_payment_method('payment_method_token') end end def test_payment_method_token_token_not_found assert_raise_with_message(Spreedly::NotFoundError, "Unable to find the specified payment method.") do @environment.recache_payment_method('unknown_token') end end def test_successful_recache card_token = create_card_on(@environment).token transaction = @environment.recache_payment_method(card_token, verification_value: '123') assert transaction.succeeded? assert_equal 'retained', transaction.payment_method.storage_state end end
Version data entries
10 entries across 10 versions & 1 rubygems