From 42be5dba4f30e00d537fe4354b3dd73a71ba9d57 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 30 Aug 2015 20:27:34 +0200 Subject: [PATCH] Improved error handling. --- test/integration/email_helper_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/email_helper_test.rb b/test/integration/email_helper_test.rb index cf23bf820..d54c05915 100644 --- a/test/integration/email_helper_test.rb +++ b/test/integration/email_helper_test.rb @@ -225,7 +225,7 @@ class EmailHelperTest < ActiveSupport::TestCase assert_equal('invalid', result[:result]) # if we have to many failed logins, we need to handle another error message - if !result[:message_human].empty? + if result[:message_human] && !result[:message_human].empty? assert_equal('Authentication failed, invalid credentials!', result[:message_human]) else assert_match(/Web login required/, result[:message]) @@ -374,7 +374,7 @@ class EmailHelperTest < ActiveSupport::TestCase assert_equal('invalid', result[:result]) # if we have to many failed logins, we need to handle another error message - if !result[:message_human].empty? + if result[:message_human] && !result[:message_human].empty? assert_equal('Authentication failed!', result[:message_human]) else assert_match(/Please log in with your web browser and then try again/, result[:message])