From f6191560e6db010cd9bf8b0854174d772b49b5c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 20 Dec 2021 10:41:49 +0100 Subject: [PATCH] PayPostingImport: Testfall zu d32410ac096b angepasst --- t/pay_posting_import/datev_import.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/pay_posting_import/datev_import.t b/t/pay_posting_import/datev_import.t index 0afff356c..e11415c85 100644 --- a/t/pay_posting_import/datev_import.t +++ b/t/pay_posting_import/datev_import.t @@ -73,7 +73,13 @@ foreach my $booking (@{ $gl_bookings }) { # gl is ($current_row->[13], $booking->reference, "Buchungstext correct"); - is ("Wisavis", $booking->department->description, "Department correctly assigned"); + if (ref $booking->department eq 'SL::DB::Department') { + is ($current_row->[36], 'wisavis', "Department correctly assigned"); # lowercase + is ('Wisavis', $booking->department->description, "Department correctly assigned"); # upper case + } else { + is ($current_row->[36], '', "No Department correctly assigned"); + + } is ($source, $booking->transactions->[0]->source, "Source 0 correctly assigned"); is ($source, $booking->transactions->[1]->source, "Source 1 correctly assigned"); -- 2.20.1