Attempting to fix occasional db tests on Travis

This commit is contained in:
Lonnie Ezell 2017-08-02 22:20:19 -05:00
parent 2e1549f5b1
commit a883c95675
No known key found for this signature in database
GPG Key ID: 8EB408F8D82F5002
2 changed files with 4 additions and 2 deletions

View File

@ -1440,7 +1440,9 @@ class BaseBuilder
$this->QBOrderBy = $orderby;
}
$row = $result->getRow();
$row = is_bool($result)
? null
: $result->getRow();
if (empty($row))
{

View File

@ -496,7 +496,7 @@ class ModelTest extends \CIDatabaseTestCase
$date = $this->getPrivateProperty($entity, 'created_at');
$this->assertTrue($date instanceof Time);
$model->save($entity);
$this->assertTrue($model->save($entity));
$this->seeInDatabase('job', ['name' => 'Senior Developer', 'created_at' => '2017-07-15 00:00:00']);
}