Skip to content

Commit

Permalink
Allow faker TLDs in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
raccube committed Oct 20, 2023
1 parent e21f5cb commit dad0d72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/validators/typoed_email_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def valid?(value)

# check if the TLD is valid
tld = domain_parts.last
return false unless TLDv.valid?(tld)
return false unless TLDv.valid?(tld) || (Rails.env.test? && %w[example test].include?(tld))

# finally, common typos
return false if INVALID_ENDINGS.any? { value.end_with?(_1) }
Expand Down

0 comments on commit dad0d72

Please sign in to comment.