Skip to content

Commit

Permalink
chore spec_helper.rb: task #19
Browse files Browse the repository at this point in the history
Do not show names with latin marks.
  • Loading branch information
Pauloparakleto committed Dec 18, 2023
1 parent 75e8b31 commit f518a1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
# https://github.com/vcr/vcr/discussions/887 ways to hide sensitive data.
interaction.request.headers['Authorization'][0] = "Bearer <%= ENV['ACCESS_TOKEN'] %>"
interaction.response.body.gsub!(/\d{3}[.]\d{3}[.]\d{3}[-]\d{2}/, '999.999.999-99')
# Some names with latin punctuation had escaped
interaction.response.body.gsub!(/\\u00ed/, '')
interaction.response.body.gsub!(/\\u00f3/, '')
interaction.response.body.gsub!(/\\u00fa/, '')
interaction.response.body.gsub!(/\\u00e3/, '')
interaction.response.body.gsub!(/\\u00e7/, '')
interaction.response.body.gsub!('******', 'Aa Bb')
interaction.response.body.gsub!('****', 'Aa Bb')
interaction.response.body.gsub!(/"nome\":["^\"][a-z-A-Z]+[\s][a-z-A-Z | \s]+/, "\"nome\":\"Faker Name Souza")
end
end
Expand Down

0 comments on commit f518a1a

Please sign in to comment.