comment the GalleryAlbum view tests, and fix a test that was failing due to a bug fix

This commit is contained in:
Colin Kuskie 2008-07-13 18:32:04 +00:00
parent c4af4b4f26
commit 486edcb4d1

View file

@ -69,18 +69,27 @@ plan tests => 7;
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Test getFileIds and getFilePaginator # Test getFileIds and getFilePaginator
cmp_bag( $album->getFileIds, [ map { $_->getId } @photos ] ); cmp_bag( $album->getFileIds, [ map { $_->getId } @photos ], 'getFileIds returns ids of all photos' );
my $p = $album->getFilePaginator; my $p = $album->getFilePaginator;
isa_ok( $p, "WebGUI::Paginator" ); isa_ok( $p, "WebGUI::Paginator" );
cmp_deeply( $p->getPageData, subbagof( map { $_->getId } @photos ) ); cmp_deeply( $p->getPageData, subbagof( map { $_->getId } @photos ), 'getPageData contains a subset of the ids o the photos');
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Test getTemplateVars # Test getTemplateVars
# Is a superset of Asset->get # Is a superset of Asset->get
# NOTE: url is Asset->getUrl # NOTE: url is Asset->getUrl
cmp_deeply( $album->getTemplateVars, superhashof( { %{$album->get}, url => $album->getUrl, } ) ); # NOTE: undef description remapped to empty string ''
cmp_deeply(
$album->getTemplateVars,
superhashof( {
%{$album->get},
url => $album->getUrl,
description => '',
} ),
q|getTemplateVariables returns the Album's asset properties|
);
# Contains specific keys/values # Contains specific keys/values
my $expected = { my $expected = {
@ -114,7 +123,7 @@ my $expected = {
=> WebGUI::User->new($session, 3)->username, => WebGUI::User->new($session, 3)->username,
}; };
cmp_deeply( $album->getTemplateVars, superhashof( $expected ) ); cmp_deeply( $album->getTemplateVars, superhashof( $expected ), '... and also returns a set of other template variables' );
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Test appendTemplateVarsFileLoop # Test appendTemplateVarsFileLoop