X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/0449024ca0f53307615993e9a480a28355153bc7..a3618d2b5fcb991fef7786fbbbfd6d3e0ac88d28:/test/integration/user_creation_test.rb diff --git a/test/integration/user_creation_test.rb b/test/integration/user_creation_test.rb index 09d2cc1fd..e0a51e4d3 100644 --- a/test/integration/user_creation_test.rb +++ b/test/integration/user_creation_test.rb @@ -92,7 +92,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct assert_match /#{@url}/, register_email.body.to_s @@ -132,13 +132,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -245,13 +245,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_openid/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -362,13 +362,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_google/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -475,13 +475,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_facebook/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -588,13 +588,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_windowslive/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -701,13 +701,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_github/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success @@ -814,13 +814,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the e-mail register_email = ActionMailer::Base.deliveries.first - assert_equal register_email.to[0], new_email + assert_equal register_email.to.first, new_email # Check that the confirm account url is correct confirm_regex = Regexp.new("/user/redirect_tester_wikipedia/confirm\\?confirm_string=([a-zA-Z0-9]*)") email_text_parts(register_email).each do |part| assert_match confirm_regex, part.body.to_s end - confirm_string = email_text_parts(register_email)[0].body.match(confirm_regex)[1] + confirm_string = email_text_parts(register_email).first.body.match(confirm_regex)[1] # Check the page assert_response :success