root/Apache-Session-Generate-ModUniqueId/trunk/t/01_generate.t

Revision 288 (checked in by miyagawa, 19 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Test::More tests => 2;
3 use Apache::Session::Generate::ModUniqueId;
4
5 my $session = bless { data => {}, args => {} }, 'Apache::Session';
6 {
7     eval  {
8         Apache::Session::Generate::ModUniqueId::generate($session);
9     };
10     like $@, qr/mod_unique_id/, 'fails to load unique_id';
11 }
12
13 {
14     local $ENV{UNIQUE_ID} = 'foobar';
15     Apache::Session::Generate::ModUniqueId::generate($session);
16     is $session->{data}->{_session_id}, 'foobar', 'unique id';
17 }
Note: See TracBrowser for help on using the browser.