Merge branch 'test' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / t / db_helper / record_links.t
index a9ea048..2c7ea4d 100644 (file)
@@ -19,6 +19,7 @@ use SL::DB::Employee;
 use SL::DB::Invoice;
 use SL::DB::Order;
 use SL::DB::DeliveryOrder;
+use SL::DB::DeliveryOrder::TypeData qw(:types);
 use SL::DB::Part;
 use SL::DB::Unit;
 use SL::DB::TaxZone;
@@ -86,6 +87,7 @@ sub new_delivery_order {
     employee_id => $employee->id,
     salesman_id => $employee->id,
     taxzone_id  => $taxzone->id,
+    order_type => SALES_DELIVERY_ORDER_TYPE,
     %params,
   )->save;
 }
@@ -363,4 +365,6 @@ is keys %$links, 2, "batch recursive by_id direction both 3";
 is $links->{$o1->id}[0]->id, $i1->id, "batch recursive by_id direction both 4";
 is $links->{$o2->id}[0]->id, $i2->id, "batch recursive by_id direction both 5";
 
+clear_up();
+
 1;