Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Jun 26, 2024
1 parent 3e0193b commit 1930ec2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
12 changes: 12 additions & 0 deletions app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ def add_smtputf8_header
end

def convert_email_to_punycode
convert_recipient_to_punycode
convert_carbon_copy_to_punycode
convert_blind_carbon_copy_to_punycode
end

def convert_recipient_to_punycode
mail.to = Array(mail.to).map { |email| convert_domain_to_punycode(email) }
end

def convert_carbon_copy_to_punycode
mail.cc = Array(mail.cc).map { |email| convert_domain_to_punycode(email) }
end

def convert_blind_carbon_copy_to_punycode
mail.bcc = Array(mail.bcc).map { |email| convert_domain_to_punycode(email) }
end

Expand Down
27 changes: 0 additions & 27 deletions test/integration/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,4 @@ def test_user_is_notified_about_password_change
password_confirmation: new_password } }
end
end

# def test_user_create_with_punicode
# assert_enqueued_emails 1 do
# post users_path, params: {
# user: {
# email: 'example@ää.eu',
# given_names: 'John',
# surname: 'Doe',
# password: 'password123',
# password_confirmation: 'password123',
# terms_and_conditions_accepted_at: Time.now.utc,
# locale: 'en',
# mobile_phone: '+37269900366',
# identity_code: '60001017793',
# country_code: 'EE',
# accepts_terms_and_conditions: true,
# roles: ['participant'],
# phone_number_confirmed: true,
# provider: 'email'}
# }
# end

# punicode = SimpleIDN.to_ascii('ää.eu')
# assert User.find_by(email: "example@#{punicode}")

# assert_redirected_to new_user_session_path
# end
end

0 comments on commit 1930ec2

Please sign in to comment.