File: is_new.t

package info (click to toggle)
libcgi-session-perl 4.48-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 616 kB
  • sloc: perl: 1,920; makefile: 5
file content (26 lines) | stat: -r--r--r-- 428 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $Id$

use strict;


use Test::More qw/no_plan/;
BEGIN { use_ok ('CGI::Session') };

my $ses = CGI::Session->new();

eval { $ses->is_new() };
is ($@,'', "session has is_new() method");

ok( $ses->is_new(), "a brand new session is_new" ); 

my $ses_id = $ses->id();

my $ses2 = CGI::Session->load($ses_id);

ok( ! $ses2->is_new(), "a session that has been closed and re-opened is not new");


$ses->delete();
$ses2->delete();