X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fhelper%2Fcsv.t;h=e4a625430b6ce836ed06eebc7469716a7cb840c5;hb=220ccac9cc13afd496050420c635c50d4a65c2c5;hp=d4a1571995aabdc50572f3ea91fb6d9e5bf5c2f5;hpb=61a56da0c549380aeaa9d3c04ea8ba56145444b7;p=kivitendo-erp.git diff --git a/t/helper/csv.t b/t/helper/csv.t index d4a157199..e4a625430 100644 --- a/t/helper/csv.t +++ b/t/helper/csv.t @@ -1,4 +1,4 @@ -use Test::More tests => 37; +use Test::More tests => 39; use SL::Dispatcher; use Data::Dumper; use utf8; @@ -274,4 +274,23 @@ $csv = SL::Helper::Csv->new( $csv->parse; is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'eol bug at the end of files'; +##### + +$csv = SL::Helper::Csv->new( + file => \"Description\nKaffee", + class => 'SL::DB::Part', +); +$csv->parse; +is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive header from csv works'; + +##### + +$csv = SL::Helper::Csv->new( + file => \"Kaffee", + header => [ 'Description' ], + class => 'SL::DB::Part', +); +$csv->parse; +is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'case insensitive header as param works'; + # vim: ft=perl