From: Jean-Philippe Lang Date: Sun, 4 Mar 2012 14:08:19 +0000 (+0000) Subject: Strip login and password read from the email body. X-Git-Tag: 1.4.0~226 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5803bf9fc4545610a7ee46ce7f6a6bf9b4f55a57;p=redmine.git 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 --- 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