mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
make sure randomly selected journals match prerequisites.
This commit is contained in:
@@ -66,19 +66,6 @@ class BudgetFactoryTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Put in unknown, get NULL
|
||||
*
|
||||
* @covers \FireflyIII\Factory\BudgetFactory
|
||||
*/
|
||||
public function testFindUnknown()
|
||||
{
|
||||
/** @var BudgetFactory $factory */
|
||||
$factory = app(BudgetFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$this->assertNull($factory->find(null, 'I dont exist.'.rand(1,000)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Put in NULL, will find NULL.
|
||||
*
|
||||
@@ -94,4 +81,17 @@ class BudgetFactoryTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Put in unknown, get NULL
|
||||
*
|
||||
* @covers \FireflyIII\Factory\BudgetFactory
|
||||
*/
|
||||
public function testFindUnknown()
|
||||
{
|
||||
/** @var BudgetFactory $factory */
|
||||
$factory = app(BudgetFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$this->assertNull($factory->find(null, 'I dont exist.' . rand(1, 000)));
|
||||
}
|
||||
|
||||
}
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user