ENHANCEMENT Added default /admin/cms route to cms/_config.php to clear default namespace for other controllers

BUGFIX Fixed CMSMainTest to use /admin/crm as a standard URL rather than /admin (which could be overloaded by other admins for application-like interfaces without CMS components)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60635 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-08-13 07:54:34 +00:00
parent ebb7cf3bd8
commit d5b37fab3d
2 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@ Director::addRules(50, array(
'admin/ReportField//$Action/$ID/$Type/$OtherID' => 'ReportField_Controller',
'admin/bulkload//$Action/$ID/$OtherID' => 'BulkLoaderAdmin',
'admin//ImageEditor/$Action' => 'ImageEditor',
'admin/cms//$Action/$ID/$OtherID' => 'CMSMain',
'admin//$Action/$ID/$OtherID' => 'CMSMain',
'unsubscribe//$Email/$MailingList' => 'Unsubscribe_Controller',
'PageComment//$Action/$ID' => 'PageComment_Controller',

View File

@ -11,10 +11,10 @@ class CMSMainTest extends SapphireTest {
'loggedInAs' => $this->idFromFixture('Member', 'admin')
));
$response = Director::test("admin/publishall", array('confirm' => 1), $session);
$response = Director::test("admin/cms/publishall", array('confirm' => 1), $session);
$this->assertContains('Done: Published 4 pages', $response->getBody());
$response = Director::test("admin/publishitems", array('csvIDs' => '1,2', 'ajax' => 1), $session);
$response = Director::test("admin/cms/publishitems", array('csvIDs' => '1,2', 'ajax' => 1), $session);
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());