]> source.dussan.org Git - redmine.git/commitdiff
Strip login and password read from the email body.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Mar 2012 14:08:19 +0000 (14:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Mar 2012 14:08:19 +0000 (14:08 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9093 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/mail_handler_test.rb

index bf38048db085e78a3357baee5e9116817dce1ece..bedff3731ecb9d416793c489523ce6ad6acf099d 100644 (file)
@@ -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