Moved to new mini test 6 changes.

This commit is contained in:
Martin Edenhofer 2017-03-24 19:42:28 +01:00
parent adbe490e54
commit 090c6b6d98
2 changed files with 6 additions and 6 deletions

View file

@ -119,7 +119,7 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob
def log_error(local_record, message, channel = nil)
if channel
record.preferences['delivery_channel_id'] = channel.id
local_record.preferences['delivery_channel_id'] = channel.id
end
local_record.preferences['delivery_status'] = 'fail'
local_record.preferences['delivery_status_message'] = message

View file

@ -76,10 +76,10 @@ class EmailDeliverTest < ActiveSupport::TestCase
created_by_id: 1,
)
assert_equal(nil, article1.preferences['delivery_retry'])
assert_equal(nil, article1.preferences['delivery_status'])
assert_equal(nil, article1.preferences['delivery_status_date'])
assert_equal(nil, article1.preferences['delivery_status_message'])
assert_nil(article1.preferences['delivery_retry'])
assert_nil(article1.preferences['delivery_status'])
assert_nil(article1.preferences['delivery_status_date'])
assert_nil(article1.preferences['delivery_status_message'])
result = Observer::Ticket::Article::CommunicateEmail::BackgroundJob.new(article1.id)
assert(result.perform)
@ -88,7 +88,7 @@ class EmailDeliverTest < ActiveSupport::TestCase
assert_equal(1, article1_lookup.preferences['delivery_retry'])
assert_equal('success', article1_lookup.preferences['delivery_status'])
assert(article1_lookup.preferences['delivery_status_date'])
assert_equal(nil, article1_lookup.preferences['delivery_status_message'])
assert_nil(article1_lookup.preferences['delivery_status_message'])
# send with invalid smtp settings
channel.update_attributes(