Bug 27779: (QA follow-up) Fix unit test
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 9 Aug 2022 08:27:35 +0000 (09:27 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 Aug 2022 10:37:03 +0000 (07:37 -0300)
I forgot to adapt the unit test for the new 'related_debit' key in the
outpur from the summary method.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/Koha/Cash/Register/Cashup.t

index e49c8e5..df373c3 100755 (executable)
@@ -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;