Merge flash in session and finalize before sending response patches
[catagits/Catalyst-Plugin-Session.git] / t / 03_flash.t
index 4000422..f58222c 100644 (file)
@@ -33,7 +33,7 @@ is_deeply( $c->flash, {}, "nothing in flash" );
 
 $c->flash->{foo} = "moose";
 
-$c->finalize;
+$c->finalize_body;
 
 is_deeply( $c->flash, { foo => "moose" }, "one key in flash" );
 
@@ -45,21 +45,21 @@ is_deeply( $c->flash, { foo => "moose", bar => "gorch" }, "two keys in flash" );
 
 cmp_deeply( $c->session, { __updated => re('^\d+$'), __flash => $c->flash }, "session still has __flash with flash data" );
 
-$c->finalize;
+$c->finalize_body;
 
 is_deeply( $c->flash, { bar => "gorch" }, "one key in flash" );
 
-$c->finalize;
+$c->finalize_body;
 
 $c->flash->{test} = 'clear_flash';
 
-$c->finalize;
+$c->finalize_body;
 
 $c->clear_flash();
 
 is_deeply( $c->flash, {}, "nothing in flash after clear_flash" );
 
-$c->finalize;
+$c->finalize_body;
 
 is_deeply( $c->flash, {}, "nothing in flash after finalize after clear_flash" );
 
@@ -69,7 +69,7 @@ $c->flash->{bar} = "gorch";
 
 $c->config->{session}{flash_to_stash} = 1;
 
-$c->finalize;
+$c->finalize_body;
 $c->prepare_action;
 
 is_deeply( $c->stash, { bar => "gorch" }, "flash copied to stash" );