Fixed mail delivery postmaster to sender test.

This commit is contained in:
Martin Edenhofer 2019-09-09 14:45:44 +02:00
parent 33bef7123d
commit 37687e32a1
2 changed files with 6 additions and 2 deletions

View file

@ -11,12 +11,16 @@ class EmailDeliverTest < ActiveSupport::TestCase
raise "Need MAIL_SERVER_ACCOUNT as ENV variable like export MAIL_SERVER_ACCOUNT='user:somepass'"
end
if ENV['MAIL_SERVER_EMAIL'].blank?
raise "Need MAIL_SERVER_EMAIL as ENV variable like export MAIL_SERVER_EMAIL='someunitest@example.com'"
end
server_login = ENV['MAIL_SERVER_ACCOUNT'].split(':')[0]
server_password = ENV['MAIL_SERVER_ACCOUNT'].split(':')[1]
email_address = EmailAddress.create!(
realname: 'me Helpdesk',
email: "me#{rand(999_999_999)}@example.com",
email: "some-zammad-#{ENV['MAIL_SERVER_EMAIL']}",
updated_by_id: 1,
created_by_id: 1,
)

View file

@ -30,7 +30,7 @@ class EmailPostmasterToSender < ActiveSupport::TestCase
@email_address = EmailAddress.create!(
realname: 'me Helpdesk',
email: "me#{@test_id}@example.com",
email: "some-zammad-#{ENV['MAIL_SERVER_EMAIL']}",
updated_by_id: 1,
created_by_id: 1,
)