fix MANIFEST.SKIP
[catagits/XML-Feed.git] / t / 12-multi-categories.base
CommitLineData
a0cca2a4 1use strict;
2use Test::More tests => 6;
3use XML::Feed;
4
5$field ||= "categories";
6ok(my $feed = XML::Feed->parse("t/samples/${type}-multiple-${field}.xml"), "Parsed $type file with multiple categories");
7my ($entry) = $feed->entries;
8
9is_deeply(
10 [$entry->category()],
11 ["foo", "bar", "quux", "simon's tags"],
12"Got all categories");
13
14my $xml = $feed->as_xml;
15ok($feed = XML::Feed->parse(\$xml), "Reparsed $type from string");
16is_deeply(
17 [$entry->category()],
18 ["foo", "bar", "quux", "simon's tags"],
19"Got all categories again");
20
21ok($entry->category("quirka fleeg"), "Added a category");
22is_deeply(
23 [$entry->category()],
24 ["foo", "bar", "quux", "simon's tags", "quirka fleeg"],
25"Got new category");
26