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