Skip to content

Commit 1c6c5db

Browse files
author
Alexis Sukrieh
committed
test that show the issue with the last patch on HTTP::Status
1 parent f7ecf52 commit 1c6c5db

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

t/03_route_handler/09_status.t

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
use Test::More import => ['!pass'];
2+
3+
use strict;
4+
use warnings;
5+
6+
use Dancer;
7+
use lib 't';
8+
use TestUtils;
9+
10+
get '/' => sub { 1 };
11+
12+
my @tests = (
13+
[ 'GET', '/', '200 OK'],
14+
);
15+
plan tests => scalar(@tests);
16+
17+
foreach my $test (@tests) {
18+
my ($method, $path, $expected) = @$test;
19+
20+
my $cgi = fake_request($method => $path);
21+
Dancer::SharedData->cgi($cgi);
22+
my $response = Dancer::Renderer::get_action_response();
23+
24+
is(Dancer::HTTP::status($response->{status}), "HTTP/1.0 $expected",
25+
"status looks good for $method $path");
26+
}
27+

0 commit comments

Comments
 (0)