Sha256: 8dc0bc9026b029ef32fa7af2cfb3fb2020619866ef21a09cc78028fabac541cd
Contents?: true
Size: 722 Bytes
Versions: 1
Compression:
Stored size: 722 Bytes
Contents
describe MangoPay do include_context 'users' include_context 'payins' describe 'requests log file' do let(:log_file) do File.join(MangoPay.configuration.temp_dir, 'mangopay.log.tmp') end it 'filters confidential parameters' do FileUtils.rm_f(log_file) MangoPay.configuration.log_file = log_file created = new_card_registration lines = File.open(log_file).select { |l| l.include?('AccessKey') } lines.each do |line| result = JSON.load(/({.+})\s+$/.match(line)[0]) expect(result['AccessKey']).to eq('[FILTERED]') expect(result['Id']).not_to eq('[FILTERED]') end FileUtils.rm_f(log_file) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mangopay-3.0.25 | spec/mangopay/log_requests_filter_spec.rb |