or plan skip_all =>
'Test::WWW::Mechanize::PSGI is required for this test';
+ eval { require Catalyst::Plugin::Authentication; 1 }
+ or plan skip_all => "Catalyst::Plugin::Authentication is required for this test";
+
plan tests => 12;
}
$ua->content_contains('session variable set');
-# Change Client
-#local $ENV{REMOTE_ADDR} = "192.168.1.2";
+# Change Client
use Plack::Builder;
my $app = SessionTestApp->psgi_app(@_);
-builder {
- enable 'ForceEnv' => REMOTE_ADDR => "192.168.1.2";
- $app;
-};
my $ua2 = Test::WWW::Mechanize::PSGI->new(
app => $app,
cookie_jar => {}
-);
+);
$ua2->get_ok( "http://localhost/get_session_variable/logged");
$ua2->content_contains('VAR_logged=n.a.');
$ua->get_ok( "http://localhost/set_session_variable/logged/in" );
$ua->content_contains('session variable set');
-# Change Client
+# Change Client
local $ENV{REMOTE_ADDR} = "192.168.1.2";
$ua->get_ok( "http://localhost/get_session_variable/logged" );