Commit: 71d692787cfb93218cc7e03e35fe57c9bd8db5a6

Author: alkemann | Date: 2010-01-05 20:19:01 +0100
updating controller and integration test to work with current api
diff --git a/controllers/PastesController.php b/controllers/PastesController.php index d9accae..ed844fe 100644 --- a/controllers/PastesController.php +++ b/controllers/PastesController.php @@ -52,7 +52,7 @@ class PastesController extends \lithium\action\Controller { */ public function view($id = null) { $paste = Paste::find($id); - if ($paste == null) { + if ($paste->rewind() == 'not_found') { $this->redirect(array('controller' => 'pastes', 'action' => 'index')); } return compact('paste'); diff --git a/tests/integration/PasteTest.php b/tests/integration/PasteTest.php index ca0a39f..b3633bc 100644 --- a/tests/integration/PasteTest.php +++ b/tests/integration/PasteTest.php @@ -69,7 +69,7 @@ class PasteTest extends \lithium\test\Unit { $result = MockIntegrationPaste::find('abcd1'); - $this->assertFalse($result->exists()); + $this->assertTrue($result->rewind() == 'not_found'); $this->_tasks(array('DeleteTable')); } @@ -83,7 +83,7 @@ class PasteTest extends \lithium\test\Unit { 'limit' => '10', 'descending' => 'true' ))); - $this->assertFalse($latest->exists()); + $this->assertFalse($latest->rewind() == 'not_found'); $viewSave = MockIntegrationPasteView::create()->save(); $this->skipIf(!$viewSave, 'Failed to save view. Tests skipped');