From e76f6d9dd34d08dccac3448ce01c8a4b02014ff6 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Tue, 9 Aug 2022 09:27:35 +0100
Subject: [PATCH] Bug 27779: (QA follow-up) Fix unit test

I forgot to adapt the unit test for the new 'related_debit' key in the
outpur from the summary method.
---
 t/db_dependent/Koha/Cash/Register/Cashup.t | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/t/db_dependent/Koha/Cash/Register/Cashup.t b/t/db_dependent/Koha/Cash/Register/Cashup.t
index e49c8e5223..df373c3d87 100755
--- a/t/db_dependent/Koha/Cash/Register/Cashup.t
+++ b/t/db_dependent/Koha/Cash/Register/Cashup.t
@@ -200,9 +200,15 @@ subtest 'summary' => sub {
       {
         'total'       => '0.5',
         'credit_type' => {
-            'description' => 'A refund applied to a patrons fine'
+            'description' => 'Refund'
         },
-        'credit_type_code' => 'REFUND'
+        'credit_type_code' => 'REFUND',
+        'related_debit' => {
+            'debit_type_code' => 'LOST',
+            'debit_type' => {
+                'description' => 'Lost item'
+            }
+        }
       };
 
     $expected_total += $expected_income_total;
@@ -322,9 +328,15 @@ subtest 'summary' => sub {
       {
         'total'       => '1',
         'credit_type' => {
-            'description' => 'A refund applied to a patrons fine'
+            'description' => 'Refund'
         },
-        'credit_type_code' => 'REFUND'
+        'credit_type_code' => 'REFUND',
+        'related_debit' => {
+            'debit_type_code' => 'ACCOUNT',
+            'debit_type' => {
+                'description' => 'Account creation fee'
+            }
+        }
       };
 
     $expected_total += $expected_income_total;
-- 
2.20.1