Browse files

Fixes #45, make hanami mailer compatible with mail-2.6.4

In newer version of mail, greater than 2.6.4, the content type of
non-text types are no longer have charset parameter, see

To maintain compatible between old and new version, we need to change
the way we assert content type. We should expect each part explicitly
in separated assertion, don't assert on the whole string.
  • Loading branch information...
voanhduy1512 committed Feb 1, 2016
1 parent 77067c4 commit ecbb97e0f1d3a7516da9cb0f20d462db4dfec8c3
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/delivery_test.rb
@@ -57,7 +57,9 @@
attachment.wont_be :multipart?
attachment.filename.must_equal 'invoice.pdf'
attachment.content_type.must_equal 'application/pdf; charset=UTF-8; filename=invoice.pdf'
attachment.content_type.must_match 'application/pdf'
attachment.content_type.must_match 'filename=invoice.pdf'

0 comments on commit ecbb97e

Please sign in to comment.