Adjust unit tests with id parameter for exists() method

This commit is contained in:
bancer 2018-10-30 11:02:42 +01:00
parent 3ea39d96b4
commit d8d65027ac
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@
*/
public function delete($id = null) {
$this->BakeArticle->id = $id;
if (!$this->BakeArticle->exists()) {
if (!$this->BakeArticle->exists($id)) {
throw new NotFoundException(__('Invalid bake article'));
}
$this->request->allowMethod('post', 'delete');

View file

@ -72,7 +72,7 @@
*/
public function delete($id = null) {
$this->BakeArticle->id = $id;
if (!$this->BakeArticle->exists()) {
if (!$this->BakeArticle->exists($id)) {
throw new NotFoundException(__('Invalid bake article'));
}
$this->request->allowMethod('post', 'delete');