View | Details | Raw Unified | Return to bug 22343
Collapse All | Expand All

(-)a/t/Koha/Email.t (-4 / +3 lines)
Lines 25-31 use_ok('Koha::Email'); Link Here
25
25
26
subtest 'create() tests' => sub {
26
subtest 'create() tests' => sub {
27
27
28
    plan tests => 23;
28
    plan tests => 21;
29
29
30
    t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef );
30
    t::lib::Mocks::mock_preference( 'SendAllEmailsTo', undef );
31
31
Lines 56-62 subtest 'create() tests' => sub { Link Here
56
    is( $email->email->header('X-Mailer'), 'Koha', 'Value set correctly' );
56
    is( $email->email->header('X-Mailer'), 'Koha', 'Value set correctly' );
57
    is( $email->email->body, $html_body, "Body set correctly" );
57
    is( $email->email->body, $html_body, "Body set correctly" );
58
    like( $email->email->content_type, qr|text/html|, "Content type set correctly");
58
    like( $email->email->content_type, qr|text/html|, "Content type set correctly");
59
    like( $email->email->content_type, qr|charset="iso-8859-1"|, "Charset set correctly");
59
    like( $email->email->content_type, qr|charset="?iso-8859-1"?|, "Charset set correctly");
60
    like( $email->email->header('Message-ID'), qr/\<.*@.*\>/, 'Value set correctly' );
60
    like( $email->email->header('Message-ID'), qr/\<.*@.*\>/, 'Value set correctly' );
61
61
62
    t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' );
62
    t::lib::Mocks::mock_preference( 'SendAllEmailsTo', 'catchall@example.com' );
Lines 81-85 subtest 'create() tests' => sub { Link Here
81
    is( $email->email->header('Sender'), 'returnpathdefault@example.com', 'ReturnpathDefault picked when sender not passed' );
81
    is( $email->email->header('Sender'), 'returnpathdefault@example.com', 'ReturnpathDefault picked when sender not passed' );
82
    is( $email->email->body, $text_body, "Body set correctly" );
82
    is( $email->email->body, $text_body, "Body set correctly" );
83
    like( $email->email->content_type, qr|text/plain|, "Content type set correctly");
83
    like( $email->email->content_type, qr|text/plain|, "Content type set correctly");
84
    like( $email->email->content_type, qr|charset="utf-8"|, "Charset set correctly");
84
    like( $email->email->content_type, qr|charset="?utf-8"?|, "Charset set correctly");
85
};
85
};
86
- 

Return to bug 22343