summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to '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();