root/trunk/plagger/t/plugins/Filter-AddTags/filter.t

Revision 1924 (checked in by franck, 13 years ago)

r2174@franck-mbp: franck | 2007-02-27 21:16:14 +0100
add default tags to an entry
r2175@franck-mbp: franck | 2007-02-27 21:17:25 +0100
publish-iphoto deps
r2176@franck-mbp: franck | 2007-02-27 21:18:43 +0100
add images from enclosures to iPhoto
r2177@franck-mbp: franck | 2007-02-27 21:52:16 +0100
AddTags? (test & correction in .pm)
r2178@franck-mbp: franck | 2007-02-27 21:54:49 +0100

import to iphoto if there is no Mac
Glue

Line 
1 use strict;
2 use t::TestPlagger;
3
4 plan tests => 4;
5 run_eval_expected;
6
7 __END__
8 === Test without AddTags
9 --- input config
10 plugins:
11   - module: Subscription::Config
12     config:
13       feed:
14         - file://$t::TestPlagger::BaseDirURI/t/samples/rss-20.xml
15 --- expected
16 ok !$context->update->feeds->[0]->entries->[0]->tags->[0];
17
18 === Test with AddTags
19 --- input config
20 plugins:
21   - module: Subscription::Config
22     config:
23       feed:
24         - file://$t::TestPlagger::BaseDirURI/t/samples/rss-20.xml
25   - module: Filter::AddTags
26     config:
27       tags:
28         - plagger_rocks
29 --- expected
30 is $context->update->feeds->[0]->entries->[0]->tags->[0], 'plagger_rocks';
31
32 === Test with AddTags (with 2 tags)
33 --- input config
34 plugins:
35   - module: Subscription::Config
36     config:
37       feed:
38         - file://$t::TestPlagger::BaseDirURI/t/samples/rss-20.xml
39   - module: Filter::AddTags
40     config:
41       tags:
42         - plagger_rocks
43         - plagger_rocks_more
44 --- expected
45 is $context->update->feeds->[0]->entries->[0]->tags->[0], 'plagger_rocks';
46 is $context->update->feeds->[0]->entries->[0]->tags->[1], 'plagger_rocks_more';
Note: See TracBrowser for help on using the browser.