root/trunk/plagger/t/plugins/Filter-TruePermalink/redirect.t

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

Filter::TruePermalink?: remove redirectors.yaml. Instead introduced 'follow_redirect' config which defaults to 1, to check redirection by issuing GET

Line 
1 use t::TestPlagger;
2
3 test_requires_network;
4 plan 'no_plan';
5 run_eval_expected;
6
7 __END__
8
9 === redirect
10 --- input config
11 plugins:
12   - module: CustomFeed::Debug
13     config:
14       title: foo
15       link: http://localhost/
16       entry:
17         - title: bar
18           link: http://gimite.ddo.jp/rotd/click.rb?hid=tbcl&id=tag:hatena.ne.jp,2005-2006:bookmark-miyagawa-2605184&url=http://subtech.g.hatena.ne.jp/miyagawa/20060823/1156317748
19         - title: baz
20           link: http://xrl.us/q54v
21   - module: Filter::TruePermalink
22 --- expected
23 unlike $context->update->feeds->[0]->entries->[0]->permalink, qr/click\.rb/;
24 like $context->update->feeds->[0]->entries->[0]->permalink, qr/subtech/;
25 unlike $context->update->feeds->[0]->entries->[0]->permalink, qr/xrl\.us/;
26 like $context->update->feeds->[0]->entries->[0]->permalink, qr/subtech/;
Note: See TracBrowser for help on using the browser.