Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix budget limit test, and a bug in the other currencies corrector.
James Cole5f768a052582
diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.phpindex 6a235c686d..d7f4ff51fe 100644--- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php+++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php@@ -205,7 +205,7 @@ class OtherCurrenciesCorrections extends Commandif (null === $transaction->transaction_currency_id) {$transaction->transaction_currency_id = $currency->id;$transaction->save();- $this->count++;+ //$this->count++;}// when mismatch in transaction:@@ -214,7 +214,7 @@ class OtherCurrenciesCorrections extends Command$transaction->foreign_amount = $transaction->amount;$transaction->transaction_currency_id = $currency->id;$transaction->save();- $this->count++;+ //$this->count++;}});diff --git a/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php b/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.phpindex f2d55e6eab..34c6cddc50 100644--- a/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php+++ b/tests/Unit/Console/Commands/Upgrade/BudgetLimitCurrencyTest.php@@ -47,7 +47,10 @@ class BudgetLimitCurrencyTest extends TestCase*/public function testHandle(): void{+ BudgetLimit::whereNull('transaction_currency_id')->forceDelete();+$this->artisan('firefly-iii:bl-currency')+ ->expectsOutput('All budget limits are correct.')->assertExitCode(0);}