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:
parent
2803ae520c
commit
2a0eb20bc7
3 changed files with 54 additions and 5 deletions
10
t/Config.t
10
t/Config.t
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue