when executing the regex for login and password in a mail, dont get confused by windows-newlines

pull/1186/head
Philipp Tessenow 12 years ago
parent ba4c0215d6
commit 9fce36a0d4
  1. 4
      test/unit/mail_handler_test.rb

@ -211,8 +211,8 @@ class MailHandlerTest < ActiveSupport::TestCase
email = ActionMailer::Base.deliveries.first
assert_not_nil email
assert email.subject.include?('account activation')
login = email.body.encoded.match(/\* Login: (.*)$/)[1]
password = email.body.encoded.match(/\* Password: (.*)$/)[1]
login = email.body.encoded.match(/\* Login: (\S+)\s?$/)[1]
password = email.body.encoded.match(/\* Password: (\S+)\s?$/)[1]
assert_equal issue.author, User.try_to_login(login, password)
end
end

Loading…
Cancel
Save