+# assembly with service default tests (services won't be consumed)
+
+local $::locale = Locale->new('en');
+reset_db();
+create_standard_stock();
+
+set_stock(
+ part => $part1,
+ qty => 12,
+ bin => $bin2,
+);
+set_stock(
+ part => $part2,
+ qty => 6.34,
+ bin => $bin2,
+);
+
+SL::Helper::Inventory::produce_assembly(
+ part => $assembly_service,
+ qty => 1,
+ auto_allocate => 1,
+ # where to put it
+ bin => $bin1,
+);
+
+is(SL::Helper::Inventory::get_stock(part => $assembly_service), "1.00000", 'produce with auto allocation works');
+is(SL::Helper::Inventory::get_stock(part => $part1), "0.00000", 'and consumes...');
+is(SL::Helper::Inventory::get_stock(part => $part2), "0.00000", '..the materials');
+
+# check comments and warehouses
+$::form->{l_comment} = 'Y';
+$::form->{l_warehouse_from} = 'Y';
+$::form->{l_warehouse_to} = 'Y';
+local $::instance_conf->data->{produce_assembly_same_warehouse} = 1;
+
+@contents = WH->get_warehouse_journal(sort => 'date');
+
+cmp_deeply(\@contents,
+ [ ignore(), ignore(),
+ superhashof({
+ 'comment' => 'Used for assembly '. $assembly_service->partnumber .' Ein Erzeugnis mit Dienstleistungen',
+ 'warehouse_from' => 'Warehouse'
+ }),
+ superhashof({
+ 'comment' => 'Used for assembly '. $assembly_service->partnumber .' Ein Erzeugnis mit Dienstleistungen',
+ 'warehouse_from' => 'Warehouse'
+ }),
+ superhashof({
+ 'part_type' => 'assembly',
+ 'warehouse_to' => 'Warehouse'
+ }),
+ ],
+ "Comments for assembly with service productions are ok"
+);
+
+# assembly with service non default tests (services will be consumed)
+