Skip to content

Commit

Permalink
fix for setting enable_starttls_auto to false rather than nil
Browse files Browse the repository at this point in the history
  • Loading branch information
stuzart committed Apr 13, 2023
1 parent b36a8a7 commit 994b708
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/seek/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 8 additions & 0 deletions test/unit/config_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 994b708

Please sign in to comment.