Finished? Ready for merge at least.

This commit is contained in:
Doug Bell 2007-12-17 22:22:06 +00:00
parent 5d1faff793
commit 82e9bf8448
45 changed files with 5112 additions and 513 deletions

59
t/Form/SelectRichEditor.t Normal file
View file

@ -0,0 +1,59 @@
# $vim: syntax=perl
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2007 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";
## The goal of this test is to test the SelectRichEditor form control
use Scalar::Util qw( blessed );
use WebGUI::Test;
use WebGUI::Session;
use Test::More;
use Test::Deep;
use WebGUI::Form::SelectRichEditor;
#----------------------------------------------------------------------------
# Init
my $session = WebGUI::Test->session;
my $root = WebGUI::Asset->getRoot( $session );
#----------------------------------------------------------------------------
# Cleanup
END {
}
#----------------------------------------------------------------------------
# Tests
plan tests => 1;
#----------------------------------------------------------------------------
# Test that SelectRichEditor control contains all RichEdit assets.
my $richEditAssets
= $root->getLineage( ['descendants'], {
returnObjects => 1,
includeOnlyClasses => ['WebGUI::Asset::RichEdit'],
});
my $richEditOptions
= {
map { $_->getId => $_->get("title") } @$richEditAssets
};
my $control
= WebGUI::Form::SelectRichEditor->new( $session, { name => "richEditId" } );
cmp_deeply(
$control->get("options"),
$richEditOptions,
"SelectRichEditor control has options for all Rich Editors in this site",
);