Improved timing for tests.
This commit is contained in:
parent
271c6f933b
commit
4fe43fd321
1 changed files with 11 additions and 1 deletions
|
@ -2047,7 +2047,7 @@ Some Text',
|
|||
updated_by_id: 1,
|
||||
created_by_id: 1,
|
||||
)
|
||||
|
||||
sleep 1
|
||||
email_raw_string = IO.read('test/fixtures/mail33-undelivered-mail-returned-to-sender.box')
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
@ -2134,35 +2134,45 @@ no reference "
|
|||
setting_orig = Setting.get('postmaster_follow_up_search_in')
|
||||
Setting.set('postmaster_follow_up_search_in', ['body', 'attachment', 'references'])
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_subject)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_body)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_attachment)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references1)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references2)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
Setting.set('postmaster_follow_up_search_in', setting_orig)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_subject)
|
||||
assert_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_body)
|
||||
assert_not_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_attachment)
|
||||
assert_not_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references1)
|
||||
assert_not_equal(ticket.id, ticket_p.id)
|
||||
|
||||
sleep 1
|
||||
ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references2)
|
||||
assert_not_equal(ticket.id, ticket_p.id)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue