Test for verify address and fix reset __address
[catagits/Catalyst-Plugin-Session.git] / t / live_app.t
index ae2f791..cbc7cc5 100644 (file)
@@ -10,11 +10,12 @@ BEGIN {
       or plan skip_all =>
       "Catalyst::Plugin::Session::State::Cookie 0.03 or higher is required for this test";
 
-    eval { require Test::WWW::Mechanize::Catalyst }
-      or plan skip_all =>
-      "Test::WWW::Mechanize::Catalyst is required for this test";
-
-    plan tests => 36;
+    eval {
+        require Test::WWW::Mechanize::Catalyst;
+        Test::WWW::Mechanize::Catalyst->VERSION(0.51);
+    }
+    or plan skip_all =>
+        'Test::WWW::Mechanize::Catalyst >= 0.51 is required for this test';
 }
 
 use lib "t/lib";
@@ -80,6 +81,12 @@ $_->get_ok( "http://localhost/page", "get main page" ) for $ua1, $ua2;
 $ua1->content_contains( "please login", "ua1 not logged in" );
 $ua2->content_contains( "please login", "ua2 not logged in" );
 
+my $ua3 = Test::WWW::Mechanize::Catalyst->new;
+$ua3->get_ok( "http://localhost/login", "log ua3 in" );
+$ua3->get_ok( "http://localhost/dump_these_loads_session");
+$ua3->content_contains('NOT');
+
 diag("Testing against Catalyst $Catalyst::VERSION");
 diag("Testing Catalyst::Plugin::Session $Catalyst::Plugin::Session::VERSION");
 
+done_testing;