X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f6191560e6db010cd9bf8b0854174d772b49b5c2..b90ff6b18df92c98b1b875d14835d1fdf9ff339a:/t/pay_posting_import/datev_import.t diff --git a/t/pay_posting_import/datev_import.t b/t/pay_posting_import/datev_import.t index e11415c85..91934de90 100644 --- a/t/pay_posting_import/datev_import.t +++ b/t/pay_posting_import/datev_import.t @@ -18,7 +18,7 @@ Support::TestSetup::login(); my $dbh = SL::DB->client->dbh; my @charts = qw(379000 136900 372000 372500 373000 374000 377000 494700); local $::locale = Locale->new('en'); -diag("init csv"); +note("init csv"); clear_up(); # datev naming convention and expected filename entry in $::form @@ -50,6 +50,23 @@ foreach my $accno (@charts) { } # and add department (KOST1 description) + SL::DB::Department->new( + description => 'Total falsche Abteilung, niemals zuordnen!' + )->save; + + SL::DB::Department->new( + description => '2. Total falsche Abteilung, niemals zuordnen!' + )->save; + + SL::DB::Department->new( + description => '3. Total falsche Abteilung, niemals zuordnen!' + )->save; + + SL::DB::Department->new( + description => 'annahme stelle. Total falsche Abteilung, niemals zuordnen!' + )->save; + + SL::DB::Department->new( description => 'Wisavis' )->save; @@ -73,7 +90,8 @@ foreach my $booking (@{ $gl_bookings }) { # gl is ($current_row->[13], $booking->reference, "Buchungstext correct"); - if (ref $booking->department eq 'SL::DB::Department') { + if ($current_row->[36] eq 'wisavis') { + is(ref $booking->department eq 'SL::DB::Department', 1, "Department assigned"); is ($current_row->[36], 'wisavis', "Department correctly assigned"); # lowercase is ('Wisavis', $booking->department->description, "Department correctly assigned"); # upper case } else {