Skip to content

Commit

Permalink
More testing of clone
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 6, 2024
1 parent 7384601 commit 3346c99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/20-new.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use strict;

# use lib 'lib';
use Test::Most tests => 6;
use Test::Most tests => 7;

BEGIN {
use_ok('CGI::Info');
Expand All @@ -20,4 +20,5 @@ cmp_ok($info->{max_upload_size}, '==', 1024 * 1024, 'direct key-value pairs');

# Test cloning behavior by calling new() on an existing object
my $info2 = $info->new({ allow => [ 'gif' ], upload_dir => '/var/uploads' });
cmp_ok($info2->{upload_dir}, 'eq', '/var/uploads', 'clone');
cmp_ok($info2->{max_upload_size}, '==', 1024 * 1024, 'clone keeps old args');
cmp_ok($info2->{upload_dir}, 'eq', '/var/uploads', 'clone adds new args');

0 comments on commit 3346c99

Please sign in to comment.