diff options
author | franck cuny <franck@lumberjaph.net> | 2010-05-25 08:29:34 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-05-25 08:29:34 +0200 |
commit | 34a15ef1645a5e392e8fd9b753d96279714d0058 (patch) | |
tree | cd80b4935ec7d77e067b950f8c90540fa8d545e0 /t/01_basic.t | |
download | plack-middleware-i18n-34a15ef1645a5e392e8fd9b753d96279714d0058.tar.gz |
initial commit
Diffstat (limited to 't/01_basic.t')
-rw-r--r-- | t/01_basic.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/01_basic.t b/t/01_basic.t new file mode 100644 index 0000000..630bd55 --- /dev/null +++ b/t/01_basic.t @@ -0,0 +1,27 @@ +use strict; +use warnings; +use Test::More; +use Plack::Builder; +use Plack::Test; +use HTTP::Request::Common; + +my $handler = builder { + enable "i18n"; + sub { + [ '200', ['Content-Type' => 'text/html', 'Accept-Language' => 'fr'], + ['Hello world'] + ]; + }; +}; + +test_psgi + app => $handler, + client => sub { + my $cb = shift; + { + my $req = GET "http://localhost/"; + ok my $res = $cb->($req); + } +}; + +done_testing(); |