mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Fix tests.
This commit is contained in:
@@ -152,9 +152,9 @@ class AvailableBudgetController extends Controller
|
||||
public function store(AvailableBudgetRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$currency = $this->currencyRepository->findNull($data['transaction_currency_id']);
|
||||
$currency = $this->currencyRepository->findNull($data['currency_id']);
|
||||
if (null === $currency) {
|
||||
$this->currencyRepository->findByCodeNull($data['transaction_currency_code']);
|
||||
$this->currencyRepository->findByCodeNull($data['currency_code']);
|
||||
}
|
||||
if (null === $currency) {
|
||||
throw new FireflyException('Could not find the indicated currency.');
|
||||
|
||||
@@ -47,11 +47,11 @@ class AvailableBudgetRequest extends Request
|
||||
public function getAll(): array
|
||||
{
|
||||
return [
|
||||
'transaction_currency_id' => $this->integer('currency_id'),
|
||||
'transaction_currency_code' => $this->string('currency_code'),
|
||||
'amount' => $this->string('amount'),
|
||||
'start_date' => $this->date('start_date'),
|
||||
'end_date' => $this->date('end_date'),
|
||||
'currency_id' => $this->integer('currency_id'),
|
||||
'currency_code' => $this->string('currency_code'),
|
||||
'amount' => $this->string('amount'),
|
||||
'start_date' => $this->date('start_date'),
|
||||
'end_date' => $this->date('end_date'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ class AccountDestroyService
|
||||
DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]);
|
||||
|
||||
// also update recurring transactions:
|
||||
DB::table('recurrences_transactions')->where('source_id', $account->id)->update(['source_id', $moveTo->id]);
|
||||
DB::table('recurrences_transactions')->where('destination_id', $account->id)->update(['destination_id', $moveTo->id]);
|
||||
DB::table('recurrences_transactions')->where('source_id', $account->id)->update(['source_id' => $moveTo->id]);
|
||||
DB::table('recurrences_transactions')->where('destination_id', $account->id)->update(['destination_id' => $moveTo->id]);
|
||||
}
|
||||
$service = app(JournalDestroyService::class);
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@ class StageNewHandler
|
||||
$config = $this->repository->getConfiguration($this->importJob);
|
||||
$config['accounts'] = $accounts;
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
|
||||
return;
|
||||
}
|
||||
throw new FireflyException('The bunq API context is unexpectedly empty.'); // @codeCoverageIgnore
|
||||
|
||||
Reference in New Issue
Block a user