We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7ecf52 commit 1c6c5dbCopy full SHA for 1c6c5db
t/03_route_handler/09_status.t
@@ -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