Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
sugar committed Oct 1, 2011
1 parent 2f394bc commit 044d4f0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/web_app.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env perl
use strict;
use warnings;

use Test::More tests => 2;
use Plack::Test;
use HTTP::Request::Common;

use FindBin '$Bin';
my $app = require "$Bin/../web_app.psgi";

test_psgi $app, sub {
my $cb = shift;

my $res = $cb->(GET "/static/index.html");
like $res->content, qr{<body>};

$res = $cb->(GET "/static/index1.html");
like $res->content, qr{not found};
};

0 comments on commit 044d4f0

Please sign in to comment.