make sure randomly selected journals match prerequisites.

This commit is contained in:
James Cole
2018-03-02 17:07:32 +01:00
parent 139c2284b8
commit 36113f84be
80 changed files with 728 additions and 281 deletions

View File

@@ -49,7 +49,8 @@ class TransactionCurrencyFactoryTest extends TestCase
*/
public function testFindByCode()
{
$currency = TransactionCurrency::find(1);
// ;
$currency = TransactionCurrency::inRandomOrder()->whereNull('deleted_at')->first();
/** @var TransactionCurrencyFactory $factory */
$factory = app(TransactionCurrencyFactory::class);
$result = $factory->find(null, $currency->code);
@@ -61,7 +62,7 @@ class TransactionCurrencyFactoryTest extends TestCase
*/
public function testFindByID()
{
$currency = TransactionCurrency::find(1);
$currency = TransactionCurrency::inRandomOrder()->whereNull('deleted_at')->first();
/** @var TransactionCurrencyFactory $factory */
$factory = app(TransactionCurrencyFactory::class);
$result = $factory->find($currency->id, null);