Update tests to handle the new way of updating ranks in the asset manager.
This commit is contained in:
parent
3b94bad76d
commit
49c2cfd5fa
2 changed files with 3 additions and 1 deletions
|
|
@ -788,7 +788,6 @@ Returns the user to the manage assets screen.
|
|||
|
||||
sub www_setRanks {
|
||||
my $session = shift;
|
||||
$session->asset(getCurrentAsset($session));
|
||||
return $session->privilege->insufficient() unless $session->asset->canEdit;
|
||||
my $i18n = WebGUI::International->new($session, 'Asset');
|
||||
my $pb = WebGUI::ProgressBar->new($session);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ use WebGUI::Content::AssetManager;
|
|||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
my $session = WebGUI::Test->session;
|
||||
$session->http->{_http}->{noHeader} = 1; ##Workaround for cookie processing
|
||||
|
||||
# Create a folder with some stuff to test the AssetManager
|
||||
my $folder = WebGUI::Asset->getImportNode( $session )->addChild( {
|
||||
|
|
@ -61,12 +62,14 @@ $session->user({ userId => 3 });
|
|||
$session->request->uri( $folder->get('url') ); # haha!
|
||||
$session->request->setup_body( {
|
||||
op => 'assetManager',
|
||||
method => 'setRanks',
|
||||
"action_update" => 1, # button
|
||||
assetId => [ $snippet_one->getId, $snippet_two->getId, $article->getId ], # checkboxes
|
||||
$snippet_one->getId . '_rank' => 3, # rank box
|
||||
$snippet_two->getId . '_rank' => 1, # rank box
|
||||
$article->getId . '_rank' => 2, # rank box
|
||||
} );
|
||||
|
||||
WebGUI::Content::AssetManager::handler( $session );
|
||||
|
||||
cmp_deeply(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue