X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fhelper%2Fattr.t;h=5d6238ed9584c066c1b7f72db5a442dad660913c;hb=ef6a2cbcb3571634b44bf2ea1927f657fc43fc30;hp=ef49d8e74fa073d60a92918ef1b00bf82b308b59;hpb=525c820d6b13326ad4cd796ddb064bca7651d5eb;p=kivitendo-erp.git diff --git a/t/helper/attr.t b/t/helper/attr.t index ef49d8e74..5d6238ed9 100644 --- a/t/helper/attr.t +++ b/t/helper/attr.t @@ -1,21 +1,19 @@ -use Test::More tests => 29; +use Test::More tests => 32; + +use lib 't'; use DateTime; +use_ok 'Support::TestSetup'; use_ok 'SL::DB::Part'; use_ok 'SL::DB::Order'; use_ok 'SL::DB::Invoice'; -use_ok 'SL::Dispatcher'; +Support::TestSetup::login(); { -$::dispatcher = SL::Dispatcher->new; -$::dispatcher->pre_startup_setup; -no warnings 'once'; -$::form = Form->new; $::myconfig{numberformat} = '1.000,00'; $::myconfig{dateformat} = 'dd.mm.yyyy'; -$::locale = Locale->new('de'); } my $p = new_ok 'SL::DB::Part'; @@ -52,3 +50,13 @@ $i->amount(12); $i->netamount(10.34); is($i->taxamount_as_number, '1,66'); +$o->closed(1); +is $o->closed_as_bool_yn, 'Ja', 'bool 1'; +$o->closed(0); +is $o->closed_as_bool_yn, 'Nein', 'bool 2'; + +# undef test: this only works for columns without default, rose will set +# defaults according to the database +$i->taxincluded(undef); +is $i->taxincluded_as_bool_yn, '', 'bool 3'; +