Add a quick, 1-off profile category test.
This commit is contained in:
parent
118a05a00c
commit
7684aa6e53
1 changed files with 42 additions and 0 deletions
42
t/ProfileCategory.t
Normal file
42
t/ProfileCategory.t
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use FindBin;
|
||||
use strict;
|
||||
use lib "$FindBin::Bin/lib";
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
|
||||
use WebGUI::ProfileCategory;
|
||||
|
||||
use Test::More tests => 1; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# getCategories
|
||||
#
|
||||
###################################################################
|
||||
|
||||
my $categories = WebGUI::ProfileCategory->getCategories($session);
|
||||
|
||||
my @labels = map { $_->getLabel } @{ $categories };
|
||||
|
||||
$categories->[0]->set({ visible => 0});
|
||||
|
||||
my $newCategories = WebGUI::ProfileCategory->getCategories($session);
|
||||
my @newLabels = map { $_->getLabel } @{ $newCategories };
|
||||
|
||||
cmp_bag(\@newLabels, \@labels, 'Setting a category to not be visible does not change its availability through getCategories, with no options');
|
||||
|
||||
END {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue