Skip to content

Commit e6664f0

Browse files
committed
Fixing SQL errors when running model_behavior tests with postgresql. Fixes #406
1 parent bfbf31e commit e6664f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cake/tests/cases/libs/model/model_behavior.test.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -786,16 +786,16 @@ function testBehaviorBelongsToFindCallbacks() {
786786
'Apple' => array('id' => 3),
787787
'Parent' => array('id' => 2,'name' => 'Bright Red Apple', 'mytime' => '22:57:17'))
788788
);
789-
$result = $Apple->find('all', array('fields' => array('Apple.id', 'Parent.*'), 'conditions' => array('Apple.id <' => '4')));
790-
//$this->assertEqual($result, $expected2);
789+
$result = $Apple->find('all', array(
790+
'fields' => array('Apple.id', 'Parent.id', 'Parent.name', 'Parent.mytime'),
791+
'conditions' => array('Apple.id <' => '4')
792+
));
793+
$this->assertEqual($result, $expected2);
791794

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

796-
$Apple->Parent->Behaviors->attach('Test', array('before' => 'off', 'after' => 'on'));
797-
//$this->assertIdentical($Apple->find('all'), array());
798-
799799
$Apple->Parent->Behaviors->attach('Test', array('after' => 'off'));
800800
$this->assertEqual($Apple->find('all'), $expected);
801801

0 commit comments

Comments
 (0)