Minor improvements

Updated TODO
Enabled preloading
Added defaultPSGI to WebGUI::Paths
Added example of testing site via Plack::Test
This commit is contained in:
Patrick Donelan 2010-04-18 14:51:24 -04:00
parent f99f672b06
commit 5c70ffb3e0
7 changed files with 30 additions and 19 deletions

23
t/PSGI/default-site.t Normal file
View file

@ -0,0 +1,23 @@
use strict;
use warnings;
use Test::More tests => 4;
use Plack::Test;
use Plack::Util;
use HTTP::Request::Common;
use WebGUI::Paths;
my $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI );
test_psgi $app, sub {
my $cb = shift;
my $res = $cb->( GET "/" );
is $res->code, 200;
like $res->content, qr/My Company/;
$res = $cb->( GET "/?op=editSettings" );
is $res->code, 401;
like $res->content, qr/Administrative Function/;
};