Revision 5027341d
Von Jan Büren vor mehr als 5 Jahren hinzugefügt
t/bank/bank_transactions.t | ||
---|---|---|
1 |
use Test::More tests => 290;
|
|
1 |
use Test::More tests => 289;
|
|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
... | ... | |
51 | 51 |
SL::DB::Manager::BankAccount->delete_all(all => 1); |
52 | 52 |
SL::DB::Manager::PaymentTerm->delete_all(all => 1); |
53 | 53 |
SL::DB::Manager::Currency->delete_all(where => [ name => 'CUR' ]); |
54 |
# SL::DB::Manager::Default->delete_all(all => 1); |
|
54 | 55 |
}; |
55 | 56 |
|
56 | 57 |
my $bt_controller; |
... | ... | |
1189 | 1190 |
is($bt1->closed_period, 0, "$testname undefined closedto"); |
1190 | 1191 |
|
1191 | 1192 |
my $defaults = SL::DB::Manager::Default->get_all(limit => 1)->[0]; |
1192 |
$defaults->closedto(DateTime->new(year => 2019, month => 12, day => 30));
|
|
1193 |
$defaults->closedto(DateTime->new(year => 2019, month => 12, day => 31));
|
|
1193 | 1194 |
$defaults->save(); |
1194 | 1195 |
$::instance_conf->reload->data; |
1195 | 1196 |
$bt1->load(); |
1197 |
is($bt1->closed_period, 1, "$testname defined and next date closedto"); |
|
1196 | 1198 |
|
1197 |
is($bt1->closed_period, 1, "$testname defined and same date closedto"); |
|
1198 |
|
|
1199 |
$bt1->valutadate(DateTime->new(year => 2019, month => 12, day => 31)); |
|
1199 |
$bt1->valutadate(DateTime->new(year => 2020, month => 1, day => 1)); |
|
1200 | 1200 |
$bt1->save(); |
1201 | 1201 |
$bt1->load(); |
1202 | 1202 |
|
1203 | 1203 |
is($bt1->closed_period, 0, "$testname defined closedto and next date valuta"); |
1204 |
$defaults->closedto(undef); |
|
1205 |
$defaults->save(); |
|
1204 | 1206 |
|
1205 | 1207 |
} |
1206 | 1208 |
|
Auch abrufbar als: Unified diff
Testfall: closedto für bank_transactions angepasst
Prüfung auf Date 30.12.18 < 30.12.18 ist nicht falsch
Zeitstempel beide auf 0h