diff --git a/lib/seek/config.rb b/lib/seek/config.rb index 00110ab98d..b216834f0b 100644 --- a/lib/seek/config.rb +++ b/lib/seek/config.rb @@ -38,6 +38,8 @@ def smtp_propagate password = smtp_settings 'password' smtp_hash['password'] = password + smtp_hash['enable_starttls_auto'] = false if smtp_hash['enable_starttls_auto'].nil? + new_hash = {} smtp_hash.keys.each do |key| new_hash[key.to_sym] = smtp_hash[key] diff --git a/test/unit/config_test.rb b/test/unit/config_test.rb index 870064cf9b..d49311914e 100644 --- a/test/unit/config_test.rb +++ b/test/unit/config_test.rb @@ -358,6 +358,14 @@ class ConfigTest < ActiveSupport::TestCase refute setting[:encrypted_value].include?(password) end + test 'set enable_starttls_auto to false' do + Seek::Config.set_smtp_settings 'enable_starttls_auto', false + + # must be false and not nil + refute_nil ActionMailer::Base.smtp_settings[:enable_starttls_auto] + refute ActionMailer::Base.smtp_settings[:enable_starttls_auto] + end + test 'doi_prefix, doi_suffix' do assert_equal '10.5072', Seek::Config.doi_prefix assert_equal 'Sysmo.SEEK', Seek::Config.doi_suffix