Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 29666977

Von Andreas Rudin vor 10 Monaten hinzugefügt

  • ID 29666977852d268ac7028af7c7a42575d96510f5
  • Vorgänger 94fb7330
  • Nachfolger 98731962

Test für SL/Controller/YearEndTransactions.pm angepasst

Unterschiede anzeigen:

t/year_end/year_end.t
191 191
my $cb_date    = DateTime->new(year => $year, month => 12, day => 31);
192 192
my $ob_date    = $cb_date->clone->add(days => 1);
193 193

  
194
SL::Controller::YearEndTransactions::_year_end_bookings( start_date => $start_date,
195
                                                         cb_date    => $cb_date,
196
                                                       );
194
my $controller = SL::Controller::YearEndTransactions->new();
195
$controller->_year_end_bookings( start_date => $start_date,
196
                                 cb_date    => $cb_date,
197
                               );
197 198

  
198 199
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ cb_transaction => 1 ]), 14, 'acc_trans cb_transactions created ok');
199 200
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ ob_transaction => 1 ]), 10, 'acc_trans ob_transactions created ok');
......
317 318
# second and third run should be no-ops, at least while no further bookings where
318 319
# made
319 320

  
320
SL::Controller::YearEndTransactions::_year_end_bookings( start_date => $start_date,
321
                                                         cb_date    => $cb_date,
322
                                                       );
321
$controller->_year_end_bookings( start_date => $start_date,
322
                                 cb_date    => $cb_date,
323
                               );
323 324

  
324 325
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ cb_transaction => 1 ]), 14, 'acc_trans cb_transactions created ok');
325 326
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ ob_transaction => 1 ]), 10, 'acc_trans ob_transactions created ok');
......
400 401
gl_booking(10, $booking_date, 'foo', 'bar', $cash, $bank, 0, 0);
401 402
gl_booking(5,  $booking_date, 'foo', 'bar', $betriebsbedarf, $cash, 0, 0);
402 403

  
403
SL::Controller::YearEndTransactions::_year_end_bookings( start_date => $start_date,
404
                                                         cb_date    => $cb_date,
405
                                                       );
404
$controller->_year_end_bookings( start_date => $start_date,
405
                                 cb_date    => $cb_date,
406
                               );
406 407

  
407 408
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ cb_transaction => 1 ]), 23, 'acc_trans cb_transactions created ok');
408 409
is(SL::DB::Manager::AccTransaction->get_all_count(where => [ ob_transaction => 1 ]), 16, 'acc_trans ob_transactions created ok');

Auch abrufbar als: Unified diff