Permalink
Browse files

Fix failing tests.

  • Loading branch information...
1 parent 2841611 commit c4b9fa6c7ab5a47e5d4aab28a7e1071342c47a78 @markstory markstory committed Oct 25, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Cake/Test/Case/Model/ModelWriteTest.php
  2. +1 −1 lib/Cake/Utility/Validation.php
View
2 lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -58,7 +58,7 @@ public function testInsertAnotherHabtmRecordWithSameForeignKey() {
$lastInsertId = $TestModel->JoinAsJoinB->getLastInsertID();
$data['id'] = $lastInsertId;
$this->assertEquals(array('JoinAsJoinB' => $data), $result);
- $this->assertTrue($lastInsertId);
+ $this->assertTrue($lastInsertId > 0);
$result = $TestModel->JoinAsJoinB->findById(1);
$expected = array(
View
2 lib/Cake/Utility/Validation.php
@@ -860,7 +860,7 @@ public static function luhn($check, $deep = false) {
if ($deep !== true) {
return true;
}
- if (!$check) {
+ if ((int)$check === 0) {
return false;
}
$sum = 0;

0 comments on commit c4b9fa6

Please sign in to comment.