Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing SQL errors when running model_behavior tests with postgresql. F…
…ixes #406
  • Loading branch information
markstory committed Mar 8, 2010
1 parent bfbf31e commit e6664f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cake/tests/cases/libs/model/model_behavior.test.php
Expand Up @@ -786,16 +786,16 @@ function testBehaviorBelongsToFindCallbacks() {
'Apple' => array('id' => 3),
'Parent' => array('id' => 2,'name' => 'Bright Red Apple', 'mytime' => '22:57:17'))
);
$result = $Apple->find('all', array('fields' => array('Apple.id', 'Parent.*'), 'conditions' => array('Apple.id <' => '4')));
//$this->assertEqual($result, $expected2);
$result = $Apple->find('all', array(
'fields' => array('Apple.id', 'Parent.id', 'Parent.name', 'Parent.mytime'),
'conditions' => array('Apple.id <' => '4')
));
$this->assertEqual($result, $expected2);

$Apple->Parent->Behaviors->disable('Test');
$result = $Apple->find('all');
$this->assertEqual($result, $expected);

$Apple->Parent->Behaviors->attach('Test', array('before' => 'off', 'after' => 'on'));
//$this->assertIdentical($Apple->find('all'), array());

$Apple->Parent->Behaviors->attach('Test', array('after' => 'off'));
$this->assertEqual($Apple->find('all'), $expected);

Expand Down

0 comments on commit e6664f0

Please sign in to comment.