Fixed broken date test.
[catagits/XML-Feed.git] / t / 07-atom10-create.t
index e5e4d57..ec107a2 100644 (file)
@@ -1,20 +1,25 @@
 use strict;
 use Test::More;
 
-plan 'no_plan';
-
 use XML::Feed;
+use DateTime;
+
+my $now = DateTime->now();
 
 my $feed = XML::Feed->new('Atom');
 $feed->title("foo");
 $feed->description("Atom 1.0 feed");
 $feed->link("http://example.org/");
+$feed->id("tag:cpan.org;xml-feed-atom");
+$feed->modified($now);
 
 my $entry = XML::Feed::Entry->new('Atom');
 $entry->title("1st Entry");
 $entry->link("http://example.org/");
 $entry->category("blah");
 $entry->content("<p>Hello world.</p>");
+$entry->id("tag:cpan.org;xml-feed-atom-entry");
+$entry->modified($now);
 
 $feed->add_entry($entry);
 
@@ -29,6 +34,8 @@ is $feed->format, 'Atom';
 is $feed->title, "foo";
 is $feed->description, "Atom 1.0 feed";
 is $feed->link, "http://example.org/";
+is $feed->id, "tag:cpan.org;xml-feed-atom";
+is $feed->modified->iso8601, $now->iso8601;
 
 my @entries = $feed->entries;
 is @entries, 1;
@@ -40,5 +47,7 @@ is $entry->category, 'blah';
 is $entry->content->type, 'text/html';
 like $entry->content->body, qr!\s*<p>Hello world.</p>\s*!s;
 
+is $entry->id, "tag:cpan.org;xml-feed-atom-entry";
+is $entry->modified->iso8601, $now->iso8601;
 
-
+done_testing();