From: Kieren Diment Date: Wed, 8 Mar 2006 21:09:16 +0000 (+0000) Subject: gave flash persistence tests a number X-Git-Tag: v0.06~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f30b987169e25fd2784b1564890dd539beecc19a;p=catagits%2FCatalyst-Plugin-Session.git gave flash persistence tests a number --- diff --git a/t/semi_persistent_flash.t b/t/04_semi_persistent_flash.t similarity index 71% copy from t/semi_persistent_flash.t copy to t/04_semi_persistent_flash.t index 2156296..76b968b 100644 --- a/t/semi_persistent_flash.t +++ b/t/04_semi_persistent_flash.t @@ -8,6 +8,9 @@ BEGIN { or plan skip_all => "Catalyst::Plugin::Session::State::Cookie is required for this test"; + eval { require Catalyst::Plugin::Session::Store::File} + or plan skil_all => + 'Catalyst::Plugin::Session::Store::File is required for this test'; eval { require Test::WWW::Mechanize::Catalyst } or plan skip_all => 'Test::WWW::Mechanize::Catalyst is required for this test'; @@ -22,23 +25,23 @@ use Test::WWW::Mechanize::Catalyst 'FlashTestApp'; my $ua = Test::WWW::Mechanize::Catalyst->new; # flash absent for initial request -$ua->get_ok( "http://localhost/first"); +$ua->get_ok( "http://localhost/first") for $ua; $ua->content_contains( "flash is not set", "not set"); # present for 1st req. -$ua->get_ok( "http://localhost/second"); +$ua->get_ok( "http://localhost/second") for $ua; $ua->content_contains( "flash set first time", "set first"); # should be the same 2nd req. -$ua->get_ok( "http://localhost/third"); +$ua->get_ok( "http://localhost/third") for $ua; $ua->content_contains( "flash set second time", "set second"); # and the third request, flash->{is_set} has the same value as 2nd. -$ua->get_ok( "http://localhost/fourth"); +$ua->get_ok( "http://localhost/fourth") for $ua; $ua->content_contains( "flash set 3rd time, same val as prev.", "set third"); # and should be absent again for the 4th req. -$ua->get_ok( "http://localhost/fifth"); +$ua->get_ok( "http://localhost/fifth") for $ua; $ua->content_contains( "flash is not", "flash has gone"); diff --git a/t/semi_persistent_flash.t b/t/05_semi_persistent_flash.t similarity index 100% rename from t/semi_persistent_flash.t rename to t/05_semi_persistent_flash.t