Remove tests, that interact with RedirectRoute.

RedirectRoute now has exit() in it.  This makes hitting those
routes in testing dangerous.
This commit is contained in:
mark_story 2011-10-22 23:27:04 -04:00
parent 6d6aa3cb75
commit b02155e766
2 changed files with 0 additions and 12 deletions

View file

@ -298,16 +298,6 @@ class ControllerTestCaseTest extends CakeTestCase {
include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
$result = $this->Case->testAction('/some_alias'); $result = $this->Case->testAction('/some_alias');
$this->assertEquals($result, 5); $this->assertEquals($result, 5);
include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
$this->Case->testAction('/redirect_me_now');
$result = $this->Case->headers['Location'];
$this->assertEquals($result, 'http://cakephp.org');
include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
$this->Case->testAction('/redirect_me');
$result = $this->Case->headers['Location'];
$this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true));
} }
/** /**

View file

@ -21,5 +21,3 @@
Router::parseExtensions('json'); Router::parseExtensions('json');
Router::connect('/some_alias', array('controller' => 'tests_apps', 'action' => 'some_method')); Router::connect('/some_alias', array('controller' => 'tests_apps', 'action' => 'some_method'));
Router::redirect('/redirect_me_now', 'http://cakephp.org');
Router::redirect('/redirect_me', array('controller' => 'tests_apps', 'action' => 'some_method'));