| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
|
| 4 |
use Test::More 'no_plan'; |
| 5 |
|
| 6 |
use XML::Feed; |
| 7 |
|
| 8 |
my $rss = XML::Feed->parse('t/samples/rss10-double.xml'); |
| 9 |
isa_ok($rss, 'XML::Feed::Format::RSS'); |
| 10 |
my $rss_entry = ($rss->entries)[0]; |
| 11 |
isa_ok($rss_entry, 'XML::Feed::Entry::Format::RSS'); |
| 12 |
my $rss_content = $rss_entry->content; |
| 13 |
isa_ok($rss_content, 'XML::Feed::Content'); |
| 14 |
is($rss_content->type, 'text/html', 'Correct content type'); |
| 15 |
like($rss_content->body, qr(<|<), 'Contains HTML tags'); |
| 16 |
|
| 17 |
my $atom = $rss->convert('Atom'); |
| 18 |
isa_ok($atom, 'XML::Feed::Format::Atom'); |
| 19 |
my $atom_entry = ($atom->entries)[0]; |
| 20 |
isa_ok($atom_entry, 'XML::Feed::Entry::Format::Atom'); |
| 21 |
my $atom_content = $atom_entry->content; |
| 22 |
isa_ok($atom_content, 'XML::Feed::Content'); |
| 23 |
is($atom_content->type, 'text/html', 'Correct content type'); |
| 24 |
like($atom_content->body, qr(<|<), 'Contains HTML tags'); |