From d687d364d85ea55bc1fdacb825e969cb3fadfd16 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 10 Apr 2023 08:56:55 +1000 Subject: [PATCH] Additional test coverage --- app/Jobs/Bank/MatchBankTransactions.php | 2 +- tests/Feature/Bank/BankTransactionTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Bank/MatchBankTransactions.php b/app/Jobs/Bank/MatchBankTransactions.php index ecd1fdace85e..778ba8e64482 100644 --- a/app/Jobs/Bank/MatchBankTransactions.php +++ b/app/Jobs/Bank/MatchBankTransactions.php @@ -161,7 +161,7 @@ class MatchBankTransactions implements ShouldQueue foreach($_expenses as $_expense) { $expense = Expense::withTrashed() - ->where('id', $this->decodePrimaryKey($_expense)) + ->where('id', $this->decodePrimaryKey($_expense)) ->where('company_id', $this->bt->company_id) ->first(); diff --git a/tests/Feature/Bank/BankTransactionTest.php b/tests/Feature/Bank/BankTransactionTest.php index 9a58c2b631e3..e6aff6d22c82 100644 --- a/tests/Feature/Bank/BankTransactionTest.php +++ b/tests/Feature/Bank/BankTransactionTest.php @@ -77,6 +77,7 @@ class BankTransactionTest extends TestCase $this->assertEquals($this->expense->refresh()->transaction_id, $bt->id); $this->assertEquals($this->expense->hashed_id, $bt->refresh()->expense_id); + $this->assertEquals($bt->id, $this->expense->transaction_id); $this->assertEquals($this->vendor->id, $bt->vendor_id); $this->assertEquals(BankTransaction::STATUS_CONVERTED, $bt->status_id);