root/trunk/plagger/t/plugins/Notify-Eject/eject.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 use FindBin;
4
5 test_requires 'Win32::MCI::Basic' if ($^O eq 'MSWin32');
6
7 test_requires 'Plagger::Plugin::Notify::Eject';
8 {
9     no warnings 'once';
10     *CORE::GLOBAL::system = \&eject_ok;
11     *Win32::MCI::Basic::mciSendString = \&eject_ok;
12     sub eject_ok { warn 'eject ok' }
13 }
14
15 plan tests => 1;
16
17 run_eval_expected_with_capture;
18
19 __END__
20
21 === test file
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::Eject
32 --- expected
33 like $warnings, qr/eject ok/;
34
Note: See TracBrowser for help on using the browser.