# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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