From 5803bf9fc4545610a7ee46ce7f6a6bf9b4f55a57 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Mar 2012 14:08:19 +0000 Subject: [PATCH] Strip login and password read from the email body. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9093 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/mail_handler_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index bf38048db..bedff3731 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -272,8 +272,8 @@ class MailHandlerTest < ActiveSupport::TestCase email = ActionMailer::Base.deliveries.first assert_not_nil email assert email.subject.include?('account activation') - login = mail_body(email).match(/\* Login: (.*)$/)[1] - password = mail_body(email).match(/\* Password: (.*)$/)[1] + login = mail_body(email).match(/\* Login: (.*)$/)[1].strip + password = mail_body(email).match(/\* Password: (.*)$/)[1].strip assert_equal issue.author, User.try_to_login(login, password) end end -- 2.39.5