Forward port XML encoding for template based RSS feeds in the Gallery.
This commit is contained in:
parent
55e0feb687
commit
3b577599f5
6 changed files with 29 additions and 24 deletions
|
|
@ -25,6 +25,7 @@ my $session = WebGUI::Test->session;
|
|||
my $node = WebGUI::Asset->getImportNode($session);
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Gallery Test"});
|
||||
WebGUI::Test->tagsToRollback($versionTag);
|
||||
my $maker = WebGUI::Test::Maker::Permission->new;
|
||||
my $gallery;
|
||||
|
||||
|
|
@ -75,9 +76,3 @@ $maker->prepare(
|
|||
plan tests => $maker->plan;
|
||||
|
||||
$maker->run;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
$versionTag->rollback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ use Test::More;
|
|||
use WebGUI::Test; # Must use this before any other WebGUI modules
|
||||
use WebGUI::Session;
|
||||
use Test::Deep;
|
||||
plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
|
|
@ -58,6 +59,7 @@ my $gallery
|
|||
} );
|
||||
|
||||
$versionTags[-1]->commit;
|
||||
WebGUI::Test->tagsToRollback(@versionTags);
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
|
@ -110,14 +112,6 @@ $mech->content_contains(
|
|||
my $album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] );
|
||||
cmp_deeply( $properties, subhashof( $album->get ), "Properties from edit form are set correctly" );
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
for my $tag ( @versionTags ) {
|
||||
$tag->rollback;
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# getMechLogin( baseUrl, WebGUI::User, "identifier" )
|
||||
# Returns a Test::WWW::Mechanize session after logging in the given user using
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ use WebGUI::Session;
|
|||
use Test::More;
|
||||
use Test::Deep;
|
||||
use XML::Simple;
|
||||
plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
|
|
@ -27,6 +28,7 @@ my $session = WebGUI::Test->session;
|
|||
my $node = WebGUI::Asset->getImportNode($session);
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Album Test"});
|
||||
WebGUI::Test->tagsToRollback($versionTag);
|
||||
my $gallery
|
||||
= $node->addChild({
|
||||
className => "WebGUI::Asset::Wobject::Gallery",
|
||||
|
|
@ -40,13 +42,16 @@ my $album
|
|||
= $gallery->addChild({
|
||||
className => "WebGUI::Asset::Wobject::GalleryAlbum",
|
||||
ownerUserId => "3", # Admin
|
||||
description => "An RSS Description",
|
||||
description => "An RSS Description with an extra space",
|
||||
title => "Title with extra dash",
|
||||
},
|
||||
undef,
|
||||
undef,
|
||||
{
|
||||
skipAutoCommitWorkflows => 1,
|
||||
});
|
||||
diag $album->get('title');
|
||||
diag $album->get('description');
|
||||
my @photos;
|
||||
for my $i ( 0 .. 5 ) {
|
||||
$photos[ $i ]
|
||||
|
|
@ -114,9 +119,3 @@ cmp_deeply(
|
|||
},
|
||||
"RSS Datastructure is complete and correct",
|
||||
);
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
$versionTag->rollback();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue