From 49c2cfd5fa57a059afcdce767765a50e9481fe0a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 20 Jun 2009 00:03:18 +0000 Subject: [PATCH] Update tests to handle the new way of updating ranks in the asset manager. --- lib/WebGUI/Content/AssetManager.pm | 1 - t/Content/AssetManager.t | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index 968b25099..71e577433 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -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); diff --git a/t/Content/AssetManager.t b/t/Content/AssetManager.t index fd74e5708..63b9d9396 100644 --- a/t/Content/AssetManager.t +++ b/t/Content/AssetManager.t @@ -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(