File: 2.0-unencoded-body.t

package info (click to toggle)
libxml-rss-libxml-perl 0.3105%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 484 kB
  • sloc: perl: 4,940; xml: 41; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use Test::More tests => 5;
use XML::RSS::LibXML;

isa_ok my $xml = XML::RSS::LibXML->new, 'XML::RSS::LibXML';

ok $xml->parsefile('t/data/2.0/unencoded-body.rss'), 'Parse feed file';

ok my $item = $xml->{items}[0], 'Get item';

is $item->{description},
    '<img src="http://whatever.net/foo.jpg"/><br/> This is the description',
    'Description should have HTML';
is $item->{content}{encoded},
    '<img src="http://whatever.net/foo.jpg"/><br/> This is the content',
    'Content should have HTML';