Improve test results.

This commit is contained in:
James Cole
2018-09-27 06:26:03 +02:00
parent 6c4f967c39
commit 214c7a6f3e
5 changed files with 189 additions and 6 deletions

View File

@@ -574,10 +574,11 @@ class AccountFactoryTest extends TestCase
public function testFindOrCreate(): void
{
/** @var Account $account */
$account = $this->getRandomAsset();
$account = $this->getRandomRevenue();
/** @var AccountFactory $factory */
$factory = app(AccountFactory::class);
$factory->setUser($this->user());
Log::debug(sprintf('Searching for account #%d with name "%s"', $account->id, $account->name));
$result = $factory->findOrCreate($account->name, $account->accountType->type);
$this->assertEquals($result->id, $account->id);