root/trunk/plagger/t/plugins/Notify-Growl/growl.t

Revision 1656 (checked in by miyagawa, 14 years ago)
  • Updated captured variable name to $warnings.
  • Fixed POD bug in Publish::Takahashi
  • Updated ID of Publish::Takahashi test to use MD5 of file path, since it depends on local path, Eh.
  • Added failing test for Planet XSS bug
Line 
1 use strict;
2 use t::TestPlagger;
3
4 test_plugin_deps;
5
6 {
7     no warnings qw/redefine prototype once/;
8    
9     my $growl_post = \&Mac::Growl::PostNotification;
10     *Mac::Growl::PostNotification = sub {
11         $growl_post->(@_);
12         warn "Growl: " . join ':', @_, "\n";
13     };
14 }
15
16 plan 'no_plan';
17 run_eval_expected_with_capture;
18
19 __END__
20
21 === Call Growl test
22 --- input config
23 global:
24   log:
25     level: debug
26 plugins:
27   - module: Subscription::Config
28     config:
29       feed:
30         - file://$t::TestPlagger::BaseDirURI/t/samples/rss2sample.xml
31   - module: Notify::Growl
32 --- expected
33 my @count = $warnings =~ /^Growl: plagger:/gm;
34 is scalar @count, 4;
35
36 like $warnings, qr{^Growl: plagger:Liftoff News:Star City:How do Americans }m;
37 like $warnings, qr{^Growl: plagger:Liftoff News:The Engine That Does More:B}m;
Note: See TracBrowser for help on using the browser.