Added tests for expiry threshold
[catagits/Catalyst-Plugin-Session.git] / t / lib / SessionTestApp / Controller / Root.pm
index 0afc633..9a38bc8 100644 (file)
@@ -133,4 +133,13 @@ sub reset_session_expires : Global {
     $c->res->output($c->session_expires);
 }
 
+sub get_expires : Global {
+    my ( $self, $c ) = @_;
+    $c->session;
+    if (my $sid = $c->sessionid) {
+        $c->finalize_headers(); # force expiration to be updated
+        $c->res->output($c->get_session_data("expires:$sid"));
+    }
+}
+
 1;