Fix file uploads with utf8 form field names. RT#113486
[catagits/Catalyst-Runtime.git] / t / args-empty-parens-bug.t
1 use warnings;
2 use strict;
3 use Test::More;
4 use FindBin qw< $Bin >;
5 use lib "$Bin/lib";
6 use constant App => 'TestAppArgsEmptyParens';
7 use Catalyst::Test App;
8
9 {
10     my $res = request('/chain_base/args/foo/bar');
11     is $res->content, 'Args', "request '/chain_base/args/foo/bar'";
12 }
13
14 {
15     my $res = request('/chain_base/args_empty/foo/bar');
16     is $res->content, 'Args()', "request '/chain_base/args_empty/foo/bar'";
17 }
18
19 eval { App->dispatcher->dispatch_type('Chained')->list(App) };
20 ok !$@, "didn't die"
21     or diag "Died with: $@";
22 like $TestLogger::LOGS[-1], qr{/args\s*\Q(...)\E};
23 like $TestLogger::LOGS[-1], qr{/args_empty\s*\Q(...)\E};
24
25 done_testing;
26
27 __END__
28