root/trunk/plagger/t/plugins/Filter-ExtractAuthorName/author.t

Revision 1330 (checked in by miyagawa, 14 years ago)
  • Added new plugin Filter::ExtractAuthorName? to extract author name from RSS 2.0 <author> field
  • Fixed Aggregator::Simple bug to deal with single MediaRSS (magic) element
Line 
1 use strict;
2 use t::TestPlagger;
3
4 test_plugin_deps;
5 test_requires_network;
6
7 plan 'no_plan';
8 run_eval_expected;
9
10 __END__
11
12 === Example RSS 2.0 feed
13 --- input config
14 plugins:
15   - module: Subscription::Config
16     config:
17       feed:
18         - file://$t::TestPlagger::BaseDir/t/samples/rss-20.xml
19   - module: Filter::ExtractAuthorName
20 --- expected
21 is $context->update->feeds->[0]->author, 'Dave Winer';
22 is $context->update->feeds->[0]->entries->[0]->author, 'Dave Winer';
23
24 === Flickr 2.0 feed
25 --- input config
26 plugins:
27   - module: Subscription::Config
28     config:
29       feed:
30         - http://www.flickr.com/services/feeds/photos_public.gne?id=49503048699@N01&format=rss_200
31   - module: Filter::ExtractAuthorName
32 --- expected
33 is $context->update->feeds->[0]->entries->[0]->author, 'miyagawa';
Note: See TracBrowser for help on using the browser.