NewsController: redirect after edit to /news instead of /news/[id]

main
Xu 4 years ago committed by Igor Scheller
parent b77c163aad
commit ab82e1cbc0

@ -164,6 +164,6 @@ class NewsController extends BaseController
$this->addNotification('news.edit.success'); $this->addNotification('news.edit.success');
return $this->redirect->to('/news/' . $news->id); return $this->redirect->to('/news');
} }
} }

@ -204,7 +204,7 @@ class NewsControllerTest extends TestCase
->willReturn($canEditHtml); ->willReturn($canEditHtml);
$this->response->expects($this->once()) $this->response->expects($this->once())
->method('redirectTo') ->method('redirectTo')
->with('http://localhost/news/' . $id) ->with('http://localhost/news')
->willReturn($this->response); ->willReturn($this->response);
/** @var NewsController $controller */ /** @var NewsController $controller */

Loading…
Cancel
Save