Commit | Line | Data |
c33bb236 |
1 | use strict; |
2 | use warnings; |
3 | use FindBin qw/$Bin/; |
4 | use lib "$Bin/lib"; |
5 | |
6 | use Test::More; |
7 | use Catalyst::Test 'ESITest'; |
8 | |
9 | like get('/'), |
10 | qr{SubInclude test: will include /time_include using default plugin Catalyst::View::Component::SubInclude::Visit<br/> |
11 | Current time is: [\w\s:]+ --> | foo = bar | |
12 | <br/> |
13 | Current time is: [\w\s:]+ --> Capture Arg: test| baz = quux | |
14 | <br/> |
15 | |
16 | <br/><br/> |
17 | Test subinclude using specific plugins:<br/> |
18 | Current time is: [\w\s:]+ --> | plugin = SubRequest | |
19 | <br/> |
20 | Current time is: [\w\s:]+ --> | plugin = Visit | |
21 | <br/> |
22 | <!--esi <esi:include src="/time?plugin=ESI" /> --><br/> |
6582f7e5 |
23 | <br/> |
24 | <!--# include virtual="/time?plugin=SSI" --><br/> |
c33bb236 |
25 | |
26 | <br/><br/> |
27 | |
28 | |
29 | Test CaptureArgs and Args interaction (SubRequest):<br/><br/> |
30 | |
31 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest | query_arg = val | Action Arg: regular_arg |
32 | <br/> |
33 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
34 | <br/> |
35 | |
36 | Current time is: [\w\s:]+ --> | query_arg = val | Action Arg: regular_arg |
37 | <br/> |
38 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
39 | |
40 | <br/><br/> |
41 | |
42 | Test CaptureArgs and Args interaction (Visit):<br/><br/> |
43 | |
44 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest | query_arg = val | Action Arg: regular_arg |
45 | <br/> |
46 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
47 | <br/> |
48 | |
49 | Current time is: [\w\s:]+ --> | query_arg = val | Action Arg: regular_arg |
50 | <br/> |
51 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
52 | |
53 | <br/><br/> |
54 | |
55 | Test CaptureArgs and Args interaction (ESI):<br/><br/> |
56 | |
57 | <!--esi <esi:include src="/capture_argtest/time/regular_arg?query_arg=val" /> --><br/> |
58 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
59 | <br/> |
60 | |
61 | <!--esi <esi:include src="/time/regular_arg?query_arg=val" /> --><br/> |
62 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
63 | |
6582f7e5 |
64 | <br/><br/> |
65 | |
66 | Test CaptureArgs and Args interaction (SSI):<br/><br/> |
67 | |
68 | <!--# include virtual="/capture_argtest/time/regular_arg?query_arg=val" --><br/> |
69 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
70 | <br/> |
71 | |
72 | <!--# include virtual="/time/regular_arg?query_arg=val" --><br/> |
73 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
74 | |
c33bb236 |
75 | <br/><br/><br/> |
76 | |
77 | Test Args when Chained is not being used: |
78 | Current time is: [\w\s:]+ --> | query_arg = val | No Chained Args: regular_arg1, regular_arg2 |
79 | <br/> |
80 | (using: http://localhost/time_args_no_chained/regular_arg1/regular_arg2?query_arg=val)<br/> |
81 | }; |
82 | |
83 | done_testing; |