Tests for the canUseAdminMode method of User.pm

Uncovered and fixed a bug where $session->user instead of $self was used in canUseAdminMode
Added an explicit test in Config.pm to make sure that array refs can be passed to ->set.
This commit is contained in:
Colin Kuskie 2007-02-23 23:39:35 +00:00
parent 2803ae520c
commit 2a0eb20bc7
3 changed files with 54 additions and 5 deletions

View file

@ -13,7 +13,8 @@ use strict;
use lib "$FindBin::Bin/lib";
use WebGUI::Test;
use Test::More tests => 14; # increment this value for each test you create
use Test::More tests => 15; # increment this value for each test you create
use Test::Deep;
my $config = WebGUI::Test->config;
my $configFile = WebGUI::Test->file;
@ -82,3 +83,10 @@ if ($cookieName eq "") {
ok($ok, "asset classes are all valid asset classes");
}
$config->set('privateArray', ['a', 'b', 'c']);
cmp_bag($config->get('privateArray'), ['a', 'b', 'c'], 'set: array, not scalar');
END: {
$config->delete('privateArray');
}