Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions t/99_plack.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use strict;
use warnings;
use Test::More;
use Plack::Test;
use HTTP::Request::Common;

{

package Foo;

use Dancer;

get '/' => sub {
return 'Hello World';
};
}

# Pretend to have a version number while still in development
$Dancer::VERSION //= 0;

my $app = Dancer::Handler->psgi_app;
is( ref $app, 'CODE', 'Got app' );

test_psgi $app, sub {
my $cb = shift;
is( $cb->( GET '/' )->content, 'Hello World', 'root route' );
};

done_testing;