1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

Fix that test_mail_from_format_should_be_validated randomly fails (#31154).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18434 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-09-05 07:22:32 +00:00
parent 2782d4b9f9
commit f461488c41

View File

@ -20,6 +20,7 @@
require File.expand_path('../../test_helper', __FILE__)
class SettingTest < ActiveSupport::TestCase
fixtures :users
def setup
User.current = nil
@ -134,7 +135,7 @@ YAML
end
def test_mail_from_format_should_be_validated
with_settings :default_language => 'en' do
with_locale 'en' do
['[Redmine app] <redmine@example.net>', 'redmine'].each do |invalid_mail_from|
errors = Setting.set_all_from_params({:mail_from => invalid_mail_from})
assert_includes errors, [:mail_from, 'is invalid']