fix MANIFEST.SKIP
[catagits/XML-Feed.git] / t / 11-xml-base-atom.t
CommitLineData
3353d70c 1# $Id$
5383a560 2
3use strict;
7c89ffff 4use Test::More tests => 13;
5383a560 5use XML::Feed;
6
7
8my $feed = XML::Feed->parse('t/samples/base_atom.xml');
9my ($entry) = $feed->entries;
10my $content = $entry->content;
7c89ffff 11is($feed->base, "http://example.org/", "Got feed base");
12is($entry->base, "http://example.org/archives/", "Got entry base");
13is($content->base, "http://example.org/archives/000001.html", "Got content base");
14
15my $xml = $feed->as_xml;
16my $new;
17ok($new = XML::Feed->parse(\$xml), "Parsed old feed");
18my ($new_entry) = $new->entries;
19my $new_content = $entry->content;
20is($new->base, "http://example.org/", "Got feed base");
21is($new_entry->base, "http://example.org/archives/", "Got entry base");
22is($new_content->base, "http://example.org/archives/000001.html", "Got content base");
23
24
25ok($feed->base("http://foo.com/"), "Set feed base");
26ok($entry->base("http://foo.com/archives/"), "Set entry base");
27ok($content->base("http://foo.com/archives/000001.html"), "Set content base");
28
29is($feed->base, "http://foo.com/", "Got feed base");
30is($entry->base, "http://foo.com/archives/", "Got entry base");
31is($content->base, "http://foo.com/archives/000001.html", "Got content base");
32