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/> |
23 | |
24 | <br/><br/> |
25 | |
26 | |
27 | Test CaptureArgs and Args interaction (SubRequest):<br/><br/> |
28 | |
29 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest | query_arg = val | Action Arg: regular_arg |
30 | <br/> |
31 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
32 | <br/> |
33 | |
34 | Current time is: [\w\s:]+ --> | query_arg = val | Action Arg: regular_arg |
35 | <br/> |
36 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
37 | |
38 | <br/><br/> |
39 | |
40 | Test CaptureArgs and Args interaction (Visit):<br/><br/> |
41 | |
42 | Current time is: [\w\s:]+ --> Capture Arg: capture_argtest | query_arg = val | Action Arg: regular_arg |
43 | <br/> |
44 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
45 | <br/> |
46 | |
47 | Current time is: [\w\s:]+ --> | query_arg = val | Action Arg: regular_arg |
48 | <br/> |
49 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
50 | |
51 | <br/><br/> |
52 | |
53 | Test CaptureArgs and Args interaction (ESI):<br/><br/> |
54 | |
55 | <!--esi <esi:include src="/capture_argtest/time/regular_arg?query_arg=val" /> --><br/> |
56 | (using: http://localhost/capture_argtest/time/regular_arg?query_arg=val)<br/> |
57 | <br/> |
58 | |
59 | <!--esi <esi:include src="/time/regular_arg?query_arg=val" /> --><br/> |
60 | (using: http://localhost/time/regular_arg?query_arg=val)<br/> |
61 | |
62 | <br/><br/><br/> |
63 | |
64 | Test Args when Chained is not being used: |
65 | Current time is: [\w\s:]+ --> | query_arg = val | No Chained Args: regular_arg1, regular_arg2 |
66 | <br/> |
67 | (using: http://localhost/time_args_no_chained/regular_arg1/regular_arg2?query_arg=val)<br/> |
68 | }; |
69 | |
70 | done_testing; |