mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
make sure randomly selected journals match prerequisites.
This commit is contained in:
@@ -36,7 +36,7 @@ class FromAccountStartsTest extends TestCase
|
||||
*/
|
||||
public function testTriggered()
|
||||
{
|
||||
$journal = TransactionJournal::find(22);
|
||||
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
|
||||
$transaction = $journal->transactions()->where('amount', '<', 0)->first();
|
||||
$account = $transaction->account;
|
||||
|
||||
@@ -50,7 +50,7 @@ class FromAccountStartsTest extends TestCase
|
||||
*/
|
||||
public function testTriggeredLonger()
|
||||
{
|
||||
$journal = TransactionJournal::find(22);
|
||||
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
|
||||
$transaction = $journal->transactions()->where('amount', '<', 0)->first();
|
||||
$account = $transaction->account;
|
||||
|
||||
@@ -64,7 +64,7 @@ class FromAccountStartsTest extends TestCase
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = TransactionJournal::find(23);
|
||||
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
|
||||
|
||||
$trigger = FromAccountStarts::makeFromStrings('some name' . rand(1, 234), false);
|
||||
$result = $trigger->triggered($journal);
|
||||
|
Reference in New Issue
Block a user