@@ -353,8 +353,7 @@ public function testBakeActionsUsingSessions() {
353353 $ this ->assertContains ("\$this->set('bakeArticle', \$this->BakeArticle->read(null, \$id) " , $ result );
354354
355355 $ this ->assertContains ('function add() ' , $ result );
356- $ this ->assertContains ("if ( \$this->request->data) " , $ result );
357- $ this ->assertContains ("\$this->request->onlyAllow('post') " , $ result );
356+ $ this ->assertContains ("if ( \$this->request->is('post')) " , $ result );
358357 $ this ->assertContains ('if ($this->BakeArticle->save($this->request->data)) ' , $ result );
359358 $ this ->assertContains ("\$this->Session->setFlash(__('The bake article has been saved')); " , $ result );
360359
@@ -393,8 +392,7 @@ public function testBakeActionsWithNoSessions() {
393392 $ this ->assertContains ("\$this->set('bakeArticle', \$this->BakeArticle->read(null, \$id) " , $ result );
394393
395394 $ this ->assertContains ('function add() ' , $ result );
396- $ this ->assertContains ("if ( \$this->request->data) " , $ result );
397- $ this ->assertContains ("\$this->request->onlyAllow('post') " , $ result );
395+ $ this ->assertContains ("if ( \$this->request->is('post')) " , $ result );
398396 $ this ->assertContains ('if ($this->BakeArticle->save($this->request->data)) ' , $ result );
399397
400398 $ this ->assertContains ("\$this->flash(__('The bake article has been saved.'), array('action' => 'index')) " , $ result );
@@ -404,6 +402,7 @@ public function testBakeActionsWithNoSessions() {
404402 $ this ->assertContains ("\$this->set(compact('bakeTags')) " , $ result );
405403
406404 $ this ->assertContains ('function delete($id = null) ' , $ result );
405+ $ this ->assertContains ("\$this->request->onlyAllow('post', 'delete') " , $ result );
407406 $ this ->assertContains ('if ($this->BakeArticle->delete()) ' , $ result );
408407 $ this ->assertContains ("\$this->flash(__('Bake article deleted'), array('action' => 'index')) " , $ result );
409408 }
0 commit comments