Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Updates fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
osahyoun committed Mar 22, 2018
1 parent 49537d3 commit 6798d03
Show file tree
Hide file tree
Showing 7 changed files with 424 additions and 290 deletions.
2 changes: 2 additions & 0 deletions config/settings/test.yml
Expand Up @@ -127,3 +127,5 @@ calls:
dynamodb_mailer_table: 'UserMailing'

member_services_secret: 'hotpotato!'

oxr_app_id: '1234'
389 changes: 195 additions & 194 deletions spec/fixtures/vcr_cassettes/donation_currencies.yml

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions spec/fixtures/vcr_cassettes/money_from_oxr.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 0 additions & 47 deletions spec/fixtures/vcr_cassettes/money_google_bank_from_gbp.yml

This file was deleted.

47 changes: 0 additions & 47 deletions spec/fixtures/vcr_cassettes/money_google_bank_from_usd.yml

This file was deleted.

4 changes: 2 additions & 2 deletions spec/lib/payment_processor/currency_spec.rb
Expand Up @@ -5,15 +5,15 @@

describe PaymentProcessor::Currency do
it 'converts from USD' do
VCR.use_cassette('money_google_bank_from_usd') do
VCR.use_cassette('money_from_oxr') do
expect(
PaymentProcessor::Currency.convert(100, 'eur').format
).to match(/€0[.,]\d\d/)
end
end

it 'converts from GBP' do
VCR.use_cassette('money_google_bank_from_gbp') do
VCR.use_cassette('money_from_oxr') do
expect(
PaymentProcessor::Currency.convert(1000, 'eur', 'gbp').cents
).to be_between(1100, 1400)
Expand Down
1 change: 1 addition & 0 deletions spec/rails_helper.rb
Expand Up @@ -37,6 +37,7 @@

config.filter_sensitive_data('<shareprogress_api_key>') { ENV['SHARE_PROGRESS_API_KEY'] }
config.filter_sensitive_data('<gocardless_token>') { Settings.gocardless.token }
config.filter_sensitive_data('<oxr_app_id>') { Settings.oxr_app_id }
end

RSpec.configure do |config|
Expand Down

0 comments on commit 6798d03

Please sign in to comment.