fix extend_session_expires to extend the current session (RT#59595)
[catagits/Catalyst-Plugin-Session.git] / t / lib / SessionTestApp / Controller / Root.pm
index 36033be..59559b9 100644 (file)
@@ -13,6 +13,14 @@ sub login : Global {
     $c->res->output("logged in");
 }
 
+sub login_without_address : Global {
+    my ( $self, $c ) = @_;
+    $c->session;
+    $c->log->debug($c->request->address);
+    delete $c->session->{__address};
+    $c->res->output("logged in (without address)");
+}
+
 sub logout : Global {
     my ( $self, $c ) = @_;
     $c->res->output(
@@ -88,4 +96,22 @@ sub accessor_test : Global {
     }
 }
 
+sub dump_these_loads_session : Global {
+    my ($self, $c) = @_;
+
+    $c->dump_these();
+    if ($c->_session) {
+        $c->res->write('LOADED')
+    }
+    else {
+        $c->res->write('NOT');
+    }
+}
+
+sub extend_session_expires : Global {
+    my ($self, $c) = @_;
+    $c->extend_session_expires(31536000);
+    $c->res->output($c->session_expires);
+}
+
 1;