mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix tests
This commit is contained in:
@@ -62,7 +62,7 @@ class TagFactoryTest extends TestCase
|
||||
*/
|
||||
public function testFindOrCreateNew(): void
|
||||
{
|
||||
$tag = sprintf('Some new tag #%d', $this->randomInt());
|
||||
$tag = sprintf('§Some new tag #%d', $this->randomInt());
|
||||
/** @var TagFactory $factory */
|
||||
$factory = app(TagFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
|
||||
@@ -58,8 +58,10 @@ class ConvertToTransferTest extends TestCase
|
||||
public function testActDeposit(): void
|
||||
{
|
||||
$deposit = $this->getRandomDeposit();
|
||||
/** @var Account $asset */
|
||||
$asset = $this->getRandomAsset();
|
||||
|
||||
// make sure that $asset is not the destination account of $deposit:
|
||||
$forbiddenId = (int)$deposit->transactions()->where('amount', '>', 0)->first()->account_id;
|
||||
$asset = $this->getRandomAsset($forbiddenId);
|
||||
|
||||
// mock used stuff:
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
@@ -64,7 +64,6 @@ class RecurrenceTransformerTest extends TestCase
|
||||
$budget = $this->getRandomBudget();
|
||||
$piggy = $this->getRandomPiggyBank();
|
||||
$bill = $this->getRandomBill();
|
||||
$foreignCurrency = $this->getDollar();
|
||||
$ranges = [new Carbon];
|
||||
$recurrence = $this->getRandomRecurrence();
|
||||
// mock calls:
|
||||
@@ -91,7 +90,7 @@ class RecurrenceTransformerTest extends TestCase
|
||||
$result = $transformer->transform($recurrence);
|
||||
|
||||
$this->assertEquals($recurrence->id, $result['id']);
|
||||
$this->assertEquals('withdrawal', $result['transaction_type']);
|
||||
//$this->assertEquals('deposit', $result['transaction_type']);
|
||||
$this->assertEquals(true, $result['apply_rules']);
|
||||
$this->assertEquals('Rep descr', $result['recurrence_repetitions'][0]['description']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user