Bug 24446: Update GetTransfers Unit Test
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 7 Oct 2020 13:10:46 +0000 (14:10 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 3 Mar 2021 14:36:13 +0000 (15:36 +0100)
We updated the return signature for GetTransfers and as such need to
update the corresponding unit test

Test plan
1/ Run t/db_dependent/Circulation/transfers.t
2/ Confirm it passes
3/ Signoff

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Circulation/transfers.t

index 3c53882..8ca9e31 100755 (executable)
@@ -130,7 +130,7 @@ is(CreateBranchTransferLimit(undef,$branchcode_2),undef,
 my @transfers = GetTransfers($item_id1);
 cmp_deeply(
     \@transfers,
-    [ re('^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$'), $branchcode_1, $branchcode_2, re('[0-9]*') ],
+    [ re('^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$'), $branchcode_1, $branchcode_2, re('[0-9]*'), re('^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$'), undef ],
     "Transfers of the item1"
 );    #NOTE: Only the first transfer is returned
 @transfers = GetTransfers;