Update stripe/stripe-ruby-mock

This commit is contained in:
Henne Vogelsang 2022-02-15 12:52:54 +01:00
parent 0eb7496502
commit 1ca6029edc
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
3 changed files with 5 additions and 5 deletions

View file

@ -264,7 +264,7 @@ group :test do
# for mocking external requests # for mocking external requests
gem 'webmock' gem 'webmock'
# for mocking Stripe responses in tests # for mocking Stripe responses in tests
gem 'stripe-ruby-mock' gem 'stripe-ruby-mock', '~> 3.1.0.rc3'
# For validating JSON schemas # For validating JSON schemas
gem 'json-schema' gem 'json-schema'
# For using 'assigns' in tests # For using 'assigns' in tests

View file

@ -597,8 +597,8 @@ GEM
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.4.2) sqlite3 (1.4.2)
ssrf_filter (1.0.7) ssrf_filter (1.0.7)
stripe (5.38.0) stripe (5.43.0)
stripe-ruby-mock (3.0.1) stripe-ruby-mock (3.1.0.rc3)
dante (>= 0.2.0) dante (>= 0.2.0)
multi_json (~> 1.0) multi_json (~> 1.0)
stripe (> 5, < 6) stripe (> 5, < 6)
@ -755,7 +755,7 @@ DEPENDENCIES
sprockets-rails sprockets-rails
sqlite3 sqlite3
stripe stripe
stripe-ruby-mock stripe-ruby-mock (~> 3.1.0.rc3)
timecop timecop
transitions transitions
turbolinks turbolinks

View file

@ -113,7 +113,7 @@ describe Payment do
context 'when the request to Stripe is invalid' do context 'when the request to Stripe is invalid' do
it 'raises exception' do it 'raises exception' do
StripeMock.prepare_error(Stripe::InvalidRequestError.new('Your request is invalid.', code: 402)) StripeMock.prepare_error(Stripe::InvalidRequestError.new('Your request is invalid.', {}, code: 402))
expect{ payment.purchase }.not_to raise_error expect{ payment.purchase }.not_to raise_error
end end
end end