root/trunk/plagger/t/plugins/Publish-Feed/atom1-nobody.t

Revision 1863 (checked in by miyagawa, 14 years ago)

Publish::Feed bugs:

  • Fixed a bug where empty <category /> element is created when there's no tags.
  • Fixed a bug where author 'nobody' is added if the feed has author but entry doesn't.
Line 
1 use strict;
2 use FindBin;
3 use File::Spec;
4 use t::TestPlagger;
5 use XML::Feed;
6
7 our $output = "$FindBin::Bin/atom.xml";
8
9 test_plugin_deps;
10 plan 'no_plan';
11 run_eval_expected;
12
13 END {
14     unlink $output if -e $output;
15 }
16
17 __END__
18
19 === Atom 1.0 without category
20 --- input config output_file
21 plugins:
22   - module: CustomFeed::Debug
23     config:
24       title: Foo
25       author: miyagawa
26       entry:
27         - title: bar
28           link: http://www.example.org/
29   - module: Publish::Feed
30     config:
31       dir: $FindBin::Bin
32       filename: atom.xml
33 --- expected
34 my $feed = XML::Atom::Feed->new($main::output);
35 is $feed->author->name, "miyagawa";
36 ok ![ $feed->entries ]->[0]->author;
37
38
39
40
41
42
43
44
45
46
Note: See TracBrowser for help on using the browser.