@@ -, +, @@ --- t/Koha/Email.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/t/Koha/Email.t +++ a/t/Koha/Email.t @@ -25,7 +25,7 @@ use_ok('Koha::Email'); subtest 'create() tests' => sub { - plan tests => 21; + plan tests => 23; t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef ); @@ -56,7 +56,8 @@ subtest 'create() tests' => sub { is( $email->email->header('Subject'), 'Some subject', 'Value set correctly' ); is( $email->email->header('X-Mailer'), 'Koha', 'Value set correctly' ); is( $email->email->body, $html_body, "Body set correctly" ); - is( $email->email->content_type, 'text/html; charset="utf-8"', "Content type set correctly"); + like( $email->email->content_type, qr|text/html|, "Content type set correctly"); + like( $email->email->content_type, qr|charset="utf-8"|, "Charset set correctly"); like( $email->email->header('Message-ID'), qr/\<.*@.*\>/, 'Value set correctly' ); t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' ); @@ -81,6 +82,7 @@ subtest 'create() tests' => sub { is( $email->email->header('ReplyTo'), 'replytodefault@example.com', 'ReplytoDefault picked when replyto not passed' ); is( $email->email->header('Sender'), 'returnpathdefault@example.com', 'ReturnpathDefault picked when sender not passed' ); is( $email->email->body, $text_body, "Body set correctly" ); - is( $email->email->content_type, 'text/plain; charset="utf-8"; format="flowed"', "Content type set correctly"); + like( $email->email->content_type, qr|text/plain|, "Content type set correctly"); + like( $email->email->content_type, qr|charset="utf-8"|, "Charset set correctly"); }; --