root/trunk/plagger/t/plugins/CustomFeed-Debug/test.t

Revision 1434 (checked in by drawnboy, 14 years ago)

CustomFeed?::Debug : added test

Line 
1 use strict;
2 use t::TestPlagger;
3
4 plan 'no_plan';
5
6 run_eval_expected;
7
8 __END__
9
10 === Test Debug
11 --- input config
12 plugins:
13   - module: CustomFeed::Debug
14     config:
15       title: 'My Feed'
16       link: 'http://localhost/'
17       entry:
18         - title: 'First Entry'
19           link: 'http://localhost/1'
20           body: 'Hello World! :)'
21         - title: 'Second Entry'
22           link: 'http://localhost/2'
23           body: 'Good Bye! :P'
24
25 --- expected
26 is $context->update->feeds->[0]->link, 'http://localhost/';
27 is $context->update->feeds->[0]->title, 'My Feed';
28 ok $context->update->feeds->[0]->count;
29 ok $context->update->feeds->[0]->entries->[0]->title;
30 ok $context->update->feeds->[0]->entries->[0]->link;
31 ok $context->update->feeds->[0]->entries->[0]->body;
32 ok $context->update->feeds->[0]->entries->[1]->title;
33 ok $context->update->feeds->[0]->entries->[1]->link;
34 ok $context->update->feeds->[0]->entries->[1]->body;
Note: See TracBrowser for help on using the browser.