Skip to content

Commit

Permalink
forgot to add this file
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Dec 13, 2009
1 parent 46e60c2 commit 85a96f1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions t/Plack-Middleware/lint.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use strict;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;

use Plack::Middleware::Lint;

my @bad = map { Plack::Middleware::Lint->wrap($_) } (
sub { return {} },
sub { return [ 200, [], [], [] ] },
sub { return [ 200, {}, [] ] },
sub { return [ 0, [], "Hello World" ] },
sub { return [ 200, [], [ "\x{ffff}" ] ] },
);

for my $app (@bad) {
test_psgi $app, sub {
my $cb = shift;
my $res = $cb->(GET "/");
is $res->code, 500, $res->content;
};
}

done_testing;

0 comments on commit 85a96f1

Please sign in to comment.