summary refs log tree commit diff
path: root/t/01_basic.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-08-10 15:09:10 +0200
committerfranck cuny <franck@lumberjaph.net>2010-08-10 15:09:10 +0200
commit1d02a6b1b1c03539afd9720b567fa45d01a75b52 (patch)
tree4c6baef492c2dfacc541a01ee9f5fd9f6775ca6c /t/01_basic.t
parentREADME (diff)
downloaddancer-plugin-i18n-master.tar.gz
reflect modifications due to new hook system in dancer master
Diffstat (limited to '')
-rw-r--r--t/01_basic.t17
1 files changed, 8 insertions, 9 deletions
diff --git a/t/01_basic.t b/t/01_basic.t
index 72bfcc6..dbdb70d 100644
--- a/t/01_basic.t
+++ b/t/01_basic.t
@@ -1,19 +1,17 @@
 use strict;
 use warnings;
 
-#use lib ('t/lib');
 use Test::More tests => 2;
 
 use HTTP::Request;
 use LWP::UserAgent;
 use Plack::Loader;
 use Dancer::Config 'setting';
-#use TestApp;
 
 use Test::TCP;
 
 my $app = sub {
-    my $env = shift;
+    my $env     = shift;
     my $request = Dancer::Request->new($env);
     Dancer->dance($request);
 };
@@ -21,18 +19,19 @@ my $app = sub {
 Test::TCP::test_tcp(
     client => sub {
         my $port = shift;
-        my $req  = HTTP::Request->new(GET => "http://127.0.0.1:$port/");
-	$req->header( 'Accept-Language' => 'fr' );
-        my $ua   = LWP::UserAgent->new;
+        my $req = HTTP::Request->new( GET => "http://127.0.0.1:$port/" );
+        $req->header( 'Accept-Language' => 'fr' );
+        my $ua  = LWP::UserAgent->new;
         my $res = $ua->request($req);
-	like $res->content, qr/first we got bonjour/, 'french content';
-	like $res->content, qr/then we have hallo/, 'german content';
+        like $res->content, qr/first we got bonjour/, 'french content';
+        like $res->content, qr/then we have hallo/,   'german content';
     },
     server => sub {
         use t::lib::TestApp;
         my $port = shift;
         setting apphandler => 'PSGI';
-	setting template => 'template_toolkit';
+        setting appname    => 'TestApp';
+        setting template   => 'template_toolkit';
         Dancer::Config->load;
         Plack::Loader->auto( port => $port )->run($app);
     }