I have something to work with, so I thought I'd post it here. I am not sure if I am still satisfied with this.
If you want to check the redirection, change this:
$this->redirect(array('action'=>'index'));
:
$this->redirect(array('action'=>'index'), null, false);
return 'redirected to index';
Now your test might look something like this:
$data = array(...);
$result = $this->testAction(
'/people/edit/1',
array('method' => 'post', 'data' => $data));
$this->assertEqual(
'redirected to index',
$result);
, exit() . false $exit , return exit(). - - , , , . , .
, , , return exit(). , .