Remove all Lint/AmbiguousRegexpLiteral rubocop issues on code, and from rubocop_todo list
This commit is contained in:
@@ -6,12 +6,6 @@
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 3
|
||||
Lint/AmbiguousRegexpLiteral:
|
||||
Exclude:
|
||||
- 'app/helpers/verification_helper.rb'
|
||||
- 'spec/features/verification/residence_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: AllowSafeAssignment.
|
||||
Lint/AssignmentInCondition:
|
||||
|
||||
@@ -7,12 +7,12 @@ module VerificationHelper
|
||||
end
|
||||
|
||||
def mask_phone(number)
|
||||
match = number.match /\d{3}$/
|
||||
match = number.match(/\d{3}$/)
|
||||
"******#{match}"
|
||||
end
|
||||
|
||||
def mask_email(string)
|
||||
match = string.match /^(\w{1,3})(.*)@(.*)/
|
||||
match = string.match(/^(\w{1,3})(.*)@(.*)/)
|
||||
|
||||
data_to_display = match[1]
|
||||
data_to_mask = match[2]
|
||||
@@ -21,4 +21,4 @@ module VerificationHelper
|
||||
data_to_display + "*"*data_to_mask.size + "@" + email_provider
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -56,7 +56,7 @@ feature 'Residence' do
|
||||
|
||||
click_button 'Verify residence'
|
||||
|
||||
expect(page).to have_content /\d errors? prevented the verification of your residence/
|
||||
expect(page).to have_content(/\d errors? prevented the verification of your residence/)
|
||||
end
|
||||
|
||||
scenario 'Error on postal code not in census' do
|
||||
|
||||
Reference in New Issue
Block a user