root/trunk/plagger/t/plugins/UserAgent-AuthenRequest/authen.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 t::TestPlagger;
2
3 test_requires_network;
4 plan 'no_plan';
5 run_eval_expected_with_capture;
6
7 __END__
8
9 === Without auth
10 --- input config
11 global:
12   log:
13     level: debug
14 plugins:
15   - module: Subscription::Config
16     config:
17       feed:
18         - http://irisresearch.library.cornell.edu/control/authBasic/authTest/
19 --- expected
20 like $warnings, qr/401 Authorization Required/;
21
22 === With auth
23 --- input config
24 global:
25   log:
26     level: debug
27 plugins:
28   - module: Subscription::Config
29     config:
30       feed:
31         - http://irisresearch.library.cornell.edu/control/authBasic/authTest/
32   - module: UserAgent::AuthenRequest
33     config:
34       host: irisresearch.library.cornell.edu:80
35       realm: "User: test Pass:"
36       username: test
37       password: this
38 --- expected
39 unlike $warnings, qr/401 Authorization Required/;
40 like $warnings, qr!200: http://irisresearch!;
41
42 === With auth as list
43 --- input config
44 global:
45   log:
46     level: debug
47 plugins:
48   - module: Subscription::Config
49     config:
50       feed:
51         - http://irisresearch.library.cornell.edu/control/authBasic/authTest/
52   - module: UserAgent::AuthenRequest
53     config:
54       credentials:
55         - host: irisresearch.library.cornell.edu:80
56           realm: "User: test Pass:"
57           username: test
58           password: this
59 --- expected
60 unlike $warnings, qr/401 Authorization Required/;
61 like $warnings, qr!200: http://irisresearch!;
Note: See TracBrowser for help on using the browser.