Skip to content

Commit

Permalink
Added test for correct mangling of response when route extension adde…
Browse files Browse the repository at this point in the history
…d but no view class set.
  • Loading branch information
sgpinkus committed Apr 19, 2014
1 parent 89d53ca commit 13f47ba
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,19 @@ public function testAjaxViewLoaded() {
$this->assertEquals('ajax', $view->layout);
}

/**
* test configured extension but no view class set.
*/
public function testNoViewClassExtension() {
Router::parseExtensions('json', 'xml', 'ajax', 'csv');
$this->Controller->request->params['_ext'] = 'csv';
$event = new Event('Controller.startup', $this->Controller);
$this->RequestHandler->initialize($event);
$this->RequestHandler->startup($event);
$this->assertEquals('RequestHandlerTest/csv', $this->Controller->viewPath);
$this->assertEquals('csv', $this->Controller->layoutPath);
}

/**
* testStartupCallback method
*
Expand Down

0 comments on commit 13f47ba

Please sign in to comment.