Remove getRedirectLocation and setRedirectLocation from Session::Http
This commit is contained in:
parent
8b6bbdb9f7
commit
995b04e7de
8 changed files with 33 additions and 51 deletions
|
|
@ -859,26 +859,26 @@ is $trashedAsset->get('state'), 'trash', 'checkView setup: trashed an asset'
|
|||
is $clippedAsset->get('state'), 'clipboard', '... clipped an asset';
|
||||
|
||||
$session->switchAdminOff;
|
||||
$session->http->setRedirectLocation('');
|
||||
$session->response->location('');
|
||||
$session->response->status(200, 'OK');
|
||||
|
||||
$trashedAsset->checkView();
|
||||
is $session->response->status, 410, '... status set to 410 for trashed asset';
|
||||
is $session->http->getRedirectLocation, '', '... no redirect set';
|
||||
is $session->response->location, '', '... no redirect set';
|
||||
|
||||
$session->response->status(200, 'OK');
|
||||
$clippedAsset->checkView();
|
||||
is $session->response->status, 410, '... status set to 410 for cut asset';
|
||||
is $session->http->getRedirectLocation, '', '... no redirect set';
|
||||
is $session->response->location, '', '... no redirect set';
|
||||
|
||||
$session->switchAdminOn;
|
||||
$session->response->status(200, 'OK');
|
||||
is $trashedAsset->checkView(), 'chunked', '... returns "chunked" when admin is on for trashed asset';
|
||||
is $session->http->getRedirectLocation, $trashedAsset->getUrl('func=manageTrash'), '... trashed asset sets redirect to manageTrash';
|
||||
is $session->response->location, $trashedAsset->getUrl('func=manageTrash'), '... trashed asset sets redirect to manageTrash';
|
||||
|
||||
$session->http->setRedirectLocation('');
|
||||
$session->response->location('');
|
||||
is $clippedAsset->checkView(), 'chunked', 'checkView: returns "chunked" when admin is on for cut asset';
|
||||
is $session->http->getRedirectLocation, $clippedAsset->getUrl('func=manageClipboard'), '... cut asset sets redirect to manageClipboard';
|
||||
is $session->response->location, $clippedAsset->getUrl('func=manageClipboard'), '... cut asset sets redirect to manageClipboard';
|
||||
|
||||
##Return an array of hashrefs. Each hashref describes a test
|
||||
|
||||
|
|
|
|||
|
|
@ -132,9 +132,9 @@ is( $newRev->getStorageLocation->getFileContentsAsScalar('.wgaccess'), undef, "w
|
|||
|
||||
$session->config->set('enableStreamingUploads', '0');
|
||||
$asset->www_view;
|
||||
is($session->http->getRedirectLocation, $storage->getUrl('someScalarFile.txt'), 'www_view: sets a redirect');
|
||||
is($session->response->location, $storage->getUrl('someScalarFile.txt'), 'www_view: sets a redirect');
|
||||
|
||||
$session->config->set('enableStreamingUploads', '1');
|
||||
$session->http->setRedirectLocation('');
|
||||
$session->response->location('');
|
||||
$asset->www_view;
|
||||
is($session->http->getRedirectLocation, '', '... redirect not set when enableStreamingUploads is set');
|
||||
is($session->response->location, '', '... redirect not set when enableStreamingUploads is set');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue