| 1 | use strictscip-perl cpan Email-MIME-Kit 3.000008 strict/; |
| 2 | use warningsscip-perl cpan Email-MIME-Kit 3.000008 warnings/; |
| 3 | |
| 4 | use Test::Morescip-perl cpan Email-MIME-Kit 3.000008 Test/More/ tests => 4; |
| 5 | use Test::Deepscip-perl cpan Email-MIME-Kit 3.000008 Test/Deep/; |
| 6 | use libscip-perl cpan Email-MIME-Kit 3.000008 lib/ 't/lib'; |
| 7 | |
| 8 | use Email::MIME::Kitscip-perl cpan Email-MIME-Kit 3.000008 Email/MIME/Kit/; |
| 9 | |
| 10 | my $kit = Email::MIME::Kit->newscip-perl cpan Email-MIME-Kit 3.000008 Email/MIME/Kit/new().({ source => 't/kits/test.mkit' }); |
| 11 | |
| 12 | my $manifest = $kit->manifestscip-perl cpan Email-MIME-Kit 3.000008 Email/MIME/Kit/manifest().; |
| 13 | okscip-perl cpan Email-MIME-Kit 3.000008 main/ok().($manifest, 'got a manifest'); |
| 14 | |
| 15 | isa_okscip-perl cpan Email-MIME-Kit 3.000008 main/isa_ok().( |
| 16 | $kit->validatorscip-perl cpan Email-MIME-Kit 3.000008 Email/MIME/Kit/validator()., |
| 17 | 'Email::MIME::Kit::Validator::Simplest', |
| 18 | "kit's validator", |
| 19 | ); |
| 20 | |
| 21 | cmp_deeplyscip-perl cpan Email-MIME-Kit 3.000008 main/cmp_deeply().( |
| 22 | $manifest->{alternatives}[0], |
| 23 | superhashofscip-perl cpan Email-MIME-Kit 3.000008 main/superhashof().({ |
| 24 | attributes => { content_type => "text/plain" }, |
| 25 | body => "We don't support tests.", |
| 26 | }), |
| 27 | "we have desugared the first alternative's c-t", |
| 28 | ); |
| 29 | |
| 30 | cmp_deeplyscip-perl cpan Email-MIME-Kit 3.000008 main/cmp_deeply().( |
| 31 | $manifest->{alternatives}[2]{attachments}[0], |
| 32 | superhashofscip-perl cpan Email-MIME-Kit 3.000008 main/superhashof().({ |
| 33 | attributes => { content_type => "image/jpeg" }, |
| 34 | path => "logo.jpg", |
| 35 | }), |
| 36 | "the desugaring propagated down into an alt's attachment", |
| 37 | ); |