|
|
@@ -13,5 +13,14 @@ require "$FindBin::Bin/../www/server.psgi" or die 'Could not require server.psgi
|
|
|
|
|
|
my $test = Plack::Test->create($tcms::app);
|
|
|
|
|
|
-my $res = $test->request(HEAD "/");
|
|
|
-diag explain [$tcms::app],$res;
|
|
|
+#TODO Need a testing routing table which I can dynamically include -- a testing theme is probably the way
|
|
|
+
|
|
|
+subtest "HEAD requests handled correctly" => sub {
|
|
|
+ my $res = $test->request(HEAD "/");
|
|
|
+ cmp_ok($res->header('content-length'), '>', 0, "Headers sent correctly");
|
|
|
+ is($res->code, 200, "Return code returned as expected");
|
|
|
+ is($res->content, '', "No content actually returned by HEAD request");
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+done_testing();
|