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