From 31ac109b216a210fa9ffc18074e1b530a35f506a Mon Sep 17 00:00:00 2001 From: Brandur Date: Tue, 10 Apr 2018 12:52:55 -0700 Subject: [PATCH 1/2] Upgrade `stripe-mock` to v0.12.0 The most important changes here are that deleted objects are now represented more accurately, and that IDs used in URLs are "reflected" back into responses so that test suites can treat return objects a little more realistically than they could before. This should resolve incompatibilities between `stripe-ruby` and newer versions of `stripe-mock`. --- .travis.yml | 2 +- test/test_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54cab49d1..2d234ec45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ sudo: false env: global: - - STRIPE_MOCK_VERSION=0.8.0 + - STRIPE_MOCK_VERSION=0.12.0 cache: directories: diff --git a/test/test_helper.rb b/test/test_helper.rb index f8a9e099e..fab4d2575 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -13,7 +13,7 @@ require File.expand_path("../test_data", __FILE__) -MOCK_MINIMUM_VERSION = "0.4.0".freeze +MOCK_MINIMUM_VERSION = "0.12.0".freeze MOCK_PORT = ENV["STRIPE_MOCK_PORT"] || 12_111 # Disable all real network connections except those that are outgoing to From 93503dceb5abc3966a126afb4d232a89ad970557 Mon Sep 17 00:00:00 2001 From: Brandur Date: Tue, 10 Apr 2018 13:03:14 -0700 Subject: [PATCH 2/2] Fix one test that was incorrectly expecting a non-deleted object back --- test/stripe/account_external_accounts_operations_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/stripe/account_external_accounts_operations_test.rb b/test/stripe/account_external_accounts_operations_test.rb index 4af6d18f2..94ff50e00 100644 --- a/test/stripe/account_external_accounts_operations_test.rb +++ b/test/stripe/account_external_accounts_operations_test.rb @@ -48,7 +48,8 @@ class AccountExternalAccountsOperationsTest < Test::Unit::TestCase @external_account_id ) assert_requested :delete, "#{Stripe.api_base}/v1/accounts/#{@account_id}/external_accounts/#{@external_account_id}" - assert external_account.is_a?(Stripe::BankAccount) + assert external_account.deleted + assert_equal @external_account_id, external_account.id end end