X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2Fcontrollers%2Fcsvimport%2Fparts.t;h=8a27d79c65b7b2a6a4a726882bf4f80cc4e46d82;hb=c364e43efab3ac6f0f0c20cd6f8f89a85ab45280;hp=89372087e68b3656f27cc03c4a95ff0b67b39885;hpb=b36f0864f0304deb66f4215c52b68351f90b2309;p=kivitendo-erp.git diff --git a/t/controllers/csvimport/parts.t b/t/controllers/csvimport/parts.t index 89372087e..8a27d79c6 100644 --- a/t/controllers/csvimport/parts.t +++ b/t/controllers/csvimport/parts.t @@ -1,4 +1,4 @@ -use Test::More tests => 43; +use Test::More tests => 33; use strict; @@ -71,7 +71,7 @@ sub reset_state { module => 'IC', name => 'mycvar', type => 'text', - description => 'mein Schatz', + description => 'mein schattz', searchable => 1, sortkey => 1, includeable => 0, @@ -94,7 +94,6 @@ sub test_import { controller => $controller, file => $file, ); - #print "profile param type=".$csv_part_import->settings->{parts_type}."\n"; $csv_part_import->test_run(0); $csv_part_import->csv(SL::Helper::Csv->new(file => $csv_part_import->file, @@ -154,7 +153,6 @@ my $settings1 = { article_number_policy => 'update_prices', shoparticle_if_missing => '0', part_type => 'part', - parts_classification => 3, default_buchungsgruppe => ($bugru ? $bugru->id : undef), apply_buchungsgruppe => 'all', }; @@ -164,8 +162,7 @@ my $settings2 = { sellprice_adjustment_type => 'percent', article_number_policy => 'update_parts', shoparticle_if_missing => '0', - part_type => 'mixed', - parts_classification => 4, + part_type => 'part', default_buchungsgruppe => ($bugru ? $bugru->id : undef), apply_buchungsgruppe => 'missing', default_unit => 'Stck', @@ -207,31 +204,29 @@ is $entry->{object}->listprice, '97.3', 'updated listprice'; ##### insert parts with warehouse,bin name $file = \<[0]; is $entry->{object}->description, 'Teil 1000', 'Teil 1000 set'; is $entry->{object}->warehouse_id, $wh1->id, 'Lager1'; is $entry->{object}->bin_id, $bin1_1->id, 'Lagerort1'; -is $entry->{object}->part_type, 'part', 'Typ ist part'; $entry = $entries->[2]; is $entry->{object}->description, 'Teil 1002', 'Teil 1002 set'; is $entry->{object}->warehouse_id, $wh2->id, 'Lager2'; is $entry->{object}->bin_id, $bin2_1->id, 'Lagerort1'; -is $entry->{object}->part_type, 'service', 'Typ ist service'; ##### update warehouse and bin $file = \<[0]; @@ -274,41 +269,16 @@ is $l->longdescription, 'notes IT','IT notes set'; ##### add customvar $file = \<[0]; is $entry->{object}->partnumber, 'P1000', 'P1000 set'; -is $entry->{raw_data}->{cvar_mycvar},'das ist der Ring','CVAR set'; -is @{$entry->{object}->custom_variables}[0]->text_value,'das ist der Ring','Cvar mit richtigem Wert'; - -# set locale to de so we can match abbreviations -$::locale = $old_locale; -##### import part classification -$file = \<[0]; -is $entry->{object}->classification_id, '1', 'W1000 von Klasse Einkauf'; -is $entry->{object}->type, 'part', 'W1000 vom Type part'; -$entry = $entries->[1]; -is $entry->{object}->classification_id, '2', 'W1001 von Klasse Verkauf'; -is $entry->{object}->type, 'part', 'W1001 vom Type part'; -$entry = $entries->[2]; -is $entry->{object}->classification_id, '2', 'D1002 von Klasse Verkauf'; -is $entry->{object}->type, 'service', 'D1002 vom Type service'; -$entry = $entries->[3]; -is $entry->{object}->classification_id, '3', 'D1003 von Klasse Handelsware'; -is $entry->{object}->type, 'service', 'D1003 vom Type service'; - +is $entry->{raw_data}->{cvar_mycvar},'das ist der ring','CVAR set'; +is @{$entry->{object}->custom_variables}[0]->text_value,'das ist der ring','Cvar mit richtigem Weert'; clear_up(); # remove all data at end of tests