XUL MenĂ¼: iframe tag durch browser tag ersetzen. box model ist in FF6 buggy mit iframes
[kivitendo-erp.git] / t / helper / csv.t
index d4a1571..434626f 100644 (file)
@@ -1,4 +1,4 @@
-use Test::More tests => 37;
+use Test::More tests => 39;
 use SL::Dispatcher;
 use Data::Dumper;
 use utf8;
@@ -11,7 +11,7 @@ $csv = SL::Helper::Csv->new(
   header => [ 'description' ],
 );
 
-isa_ok $csv->_csv, 'Text::CSV';
+isa_ok $csv->_csv, 'Text::CSV_XS';
 isa_ok $csv->_io, 'IO::File';
 isa_ok $csv->parse, 'SL::Helper::Csv', 'parsing returns self';
 is_deeply $csv->get_data, [ { description => 'Kaffee' } ], 'simple case works';
@@ -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