Found a bug in clear_flash
Rob Kinyon [Thu, 12 Oct 2006 19:16:47 +0000 (19:16 +0000)]
t/03_flash.t

index fd1fadf..c37624e 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use Test::MockObject::Extends;
 use Test::Exception;
 
@@ -43,7 +43,17 @@ is_deeply( $c->flash, { bar => "gorch" }, "one key in flash" );
 
 $c->finalize;
 
-is_deeply( $c->flash, {}, "nothing in flash" );
+$c->flash->{test} = 'clear_flash';
+
+$c->finalize;
+
+$c->clear_flash();
+
+is_deeply( $c->flash, {}, "nothing in flash after clear_flash" );
+
+$c->finalize;
+
+is_deeply( $c->flash, {}, "nothing in flash after finalize after clear_flash" );
 
 $c->flash->{bar} = "gorch";
 
@@ -53,4 +63,3 @@ $c->finalize;
 $c->prepare_action;
 
 is_deeply( $c->stash, { bar => "gorch" }, "flash copied to stash" );
-