use Test::More tests => 29;
+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';
-use Test::More tests => 39;
-use SL::Dispatcher;
+use Test::More tests => 40;
+
+use lib 't';
+
use Data::Dumper;
use utf8;
+use_ok 'Support::TestSetup';
use_ok 'SL::Helper::Csv';
-my $csv;
-$csv = SL::Helper::Csv->new(
+Support::TestSetup::login();
+
+my $csv = SL::Helper::Csv->new(
file => \"Kaffee\n",
header => [ 'description' ],
class => 'SL::DB::Part',
isa_ok $csv->parse, 'SL::Helper::Csv', 'parsing returns self';
is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'simple case works';
-
is $csv->get_objects->[0]->description, 'Kaffee', 'get_object works';
####
-{
-no warnings 'once';
-$::dispatcher = SL::Dispatcher->new;
-$::dispatcher->pre_startup_setup();
-}
-
-$::form = Form->new;
$::myconfig{numberformat} = '1.000,00';
$::myconfig{dateformat} = 'dd.mm.yyyy';
-$::locale = Locale->new('de');
$csv = SL::Helper::Csv->new(
file => \"Kaffee;0.12;12,2;1,5234\n",