improve on tests to count attachment and check attachment size

This commit is contained in:
Muhammad Nuzaihan 2018-04-09 14:49:32 +08:00
parent f8adf31ec6
commit 96bd39d861

View file

@ -4282,6 +4282,8 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_match('smith@example.com', article1.to) assert_match('smith@example.com', article1.to)
assert_match('Thanks for your inquiry (aaäöüßad asd)!', article1.subject) assert_match('Thanks for your inquiry (aaäöüßad asd)!', article1.subject)
assert_match(/.+cid:.+?@zammad.example.com.+/, article1.body) assert_match(/.+cid:.+?@zammad.example.com.+/, article1.body)
assert_equal(1, article1.attachments.count)
assert_equal('789', article1.attachments[0].size)
assert_equal('text/html', article1.content_type) assert_equal('text/html', article1.content_type)
end end
end end