Auftrags-Controller: Preisquellen bei Erneuern von Positionen aus Stammdaten …
[kivitendo-erp.git] / t / shop / shop_order.t
index aef4150..e40ec2f 100644 (file)
@@ -5,6 +5,7 @@ use lib 't';
 use Support::TestSetup;
 use Carp;
 use Test::Exception;
+use SL::DBUtils qw(check_trgm);
 use SL::Dev::ALL;
 use SL::Dev::Part qw(new_part);
 use SL::Dev::Shop qw(new_shop new_shop_part new_shop_order);
@@ -39,13 +40,13 @@ sub reset_state {
                           )->save;
 }
 
-sub save_shorcontroller_to_string {
+sub save_shopcontroller_to_string {
 
   my $output;
   open(my $outputFH, '>', \$output) or die "OUTPUT";
   my $oldFH = select $outputFH;
-  my $shor_controller = SL::Controller::ShopOrder->new;
-  $shor_controller->action_transfer;
+  my $shop_controller = SL::Controller::ShopOrder->new;
+  $shop_controller->action_transfer;
 
   select $oldFH;
   close $outputFH;
@@ -57,7 +58,7 @@ sub test_transfer {
   $::form->{import_id} = $params{import_id};
   $::form->{customer} =  $params{customer};
   my $test_name = 'Test Controller Action Transfer';
-  save_shorcontroller_to_string();
+  save_shopcontroller_to_string();
   my @links_record = RecordLinks->get_links( 'from_table' => 'shop_orders',
                                             'from_id'    => $params{import_id},
                                             'to_table'   => 'oe',
@@ -71,7 +72,7 @@ Support::TestSetup::login();
 
 reset_state();
 
-my $trgm = SL::DB::ShopOrder->check_trgm;
+my $trgm = check_trgm($::form->get_standard_dbh());
 
 my $shop_trans_id = 1;