summaryrefslogtreecommitdiff
path: root/t/01_basic.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-05-25 08:29:34 +0200
committerfranck cuny <franck@lumberjaph.net>2010-05-25 08:29:34 +0200
commit34a15ef1645a5e392e8fd9b753d96279714d0058 (patch)
treecd80b4935ec7d77e067b950f8c90540fa8d545e0 /t/01_basic.t
downloadplack-middleware-i18n-34a15ef1645a5e392e8fd9b753d96279714d0058.tar.gz
initial commit
Diffstat (limited to 't/01_basic.t')
-rw-r--r--t/01_basic.t27
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();