From: Sven Schöling Date: Wed, 3 Aug 2016 13:45:51 +0000 (+0200) Subject: Tests: warnings in t/part/assembly.t X-Git-Tag: release-3.5.4~2153 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2fe91d5d526677004e48bad825ab7a9568a96b16;p=kivitendo-erp.git Tests: warnings in t/part/assembly.t --- diff --git a/t/part/assembly.t b/t/part/assembly.t index f6241c45f..ccef0122d 100644 --- a/t/part/assembly.t +++ b/t/part/assembly.t @@ -42,7 +42,7 @@ sub reset_state { # create an assembly that consists of two parts my ($part1, $part2, $unit, $assembly_part, $assembly_1, $assembly_2); - my $unit = SL::DB::Manager::Unit->find_by(name => 'Stck') || die "Can't find unit 'Stck'"; + $unit = SL::DB::Manager::Unit->find_by(name => 'Stck') || die "Can't find unit 'Stck'"; $part1 = SL::DB::Part->new_part(partnumber => '19000', unit => $unit->name, @@ -51,13 +51,13 @@ sub reset_state { $part2->partnumber($part1->partnumber + 1); $part2->save; - my $assembly_part = SL::DB::Part->new_assembly(partnumber => 'as1', + $assembly_part = SL::DB::Part->new_assembly(partnumber => 'as1', description => 'assembly', unit => $unit->name, inventory_accno_id => undef, # override ); - my $assembly_1 = SL::DB::Assembly->new(parts_id => $part1->id, qty => 3, bom => 1); - my $assembly_2 = SL::DB::Assembly->new(parts_id => $part2->id, qty => 3, bom => 1); + $assembly_1 = SL::DB::Assembly->new(parts_id => $part1->id, qty => 3, bom => 1); + $assembly_2 = SL::DB::Assembly->new(parts_id => $part2->id, qty => 3, bom => 1); $assembly_part->add_assemblies($assembly_1, $assembly_2); $assembly_part->save; };