fixed: loginBox macro can no longer return the user to the logout page, logging them out

This commit is contained in:
Doug Bell 2008-08-19 20:39:43 +00:00
parent 27a76cd9a3
commit 57b8cc4bae
11 changed files with 78 additions and 123 deletions

View file

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

View file

@ -25,7 +25,7 @@ use WebGUI::Asset::Wobject::SyndicatedContent;
my $session = WebGUI::Test->session;
my %var;
my (@rss_feeds);
my ($items, @rss_feeds);
##############################
## SETUP ##
@ -99,10 +99,8 @@ my $rss_info = WebGUI::Asset::Wobject::SyndicatedContent::_get_rss_data($session
ok(ref($rss_info) eq 'HASH', "Hashref returned from _get_rss_data");
push(@rss_feeds, $rss_info);
my $items = [];
WebGUI::Asset::Wobject::SyndicatedContent::_create_interleaved_items($items, \@rss_feeds , $max_headlines, $hasTermsRegex);
ok($items , "Got results back from XML" );
my $xml_list = WebGUI::Asset::Wobject::SyndicatedContent::_create_interleaved_items($items, \@rss_feeds , $max_headlines, $hasTermsRegex);
ok($xml_list , "Got results back from XML " );
my($item_loop,$rss_feeds) = $syndicated_content->_get_items(\@validated_urls, $max_headlines);
ok(ref($item_loop) eq 'ARRAY',"Arrayref of items returned from _get_items" );