Commit | Line | Data |
a0ebba1d |
1 | #!/usr/bin/env perl |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use FindBin; |
6 | use lib "$FindBin::Bin/lib"; |
7 | |
e10b92dd |
8 | use Test::More tests => 8; |
a0ebba1d |
9 | use Catalyst::Test 'TestApp'; |
10 | |
11 | # simple stuff |
12 | is get('/foo'), 'Welcome to TestApp!', 'simple root action'; |
13 | |
14 | # with arguments |
15 | is get('/foo/with_args/hello/cthulhu'), 'Hello, Cthulhu!', 'simple argument'; |
16 | is get('/foo/with_args/at_end/2/3'), 6, 'two arguments at the end'; |
17 | is get('/foo/with_args/in_the_middle/3/4/end_of_the_middle'), 24, 'two arguments in the middle'; |
18 | is get('/foo/with_args/4/8/fhtagn/15/16/23/42'), '4, 8, 15, 16, 23, 42', 'complex arguments in both'; |
19 | |
20 | # under keyword |
21 | is get('/foo/under/23'), 'under 23', 'under as keyword'; |
22 | |
23 | # comma separation |
24 | is get('/foo/,comma/iaia'), 'iaia', 'comma separation'; |
e10b92dd |
25 | |
26 | # nested under |
27 | is get('/foo/lower/down/the/stream'), 23, 'nested under blocks'; |