From: G. Richardson Date: Fri, 12 Aug 2016 15:49:58 +0000 (+0200) Subject: assortment Test mit sellprice und lastcost sum X-Git-Tag: release-3.5.4~1880 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1ca40c6c7a84c32c38a60b2d31d3eb7b6030470b;p=kivitendo-erp.git assortment Test mit sellprice und lastcost sum --- diff --git a/t/part/assortment.t b/t/part/assortment.t index 0aea44784..8ad7e4310 100644 --- a/t/part/assortment.t +++ b/t/part/assortment.t @@ -18,8 +18,10 @@ is( SL::DB::Manager::Part->get_all_count(), 3, "total number of parts created i my $assortment = SL::DB::Manager::Part->find_by( partnumber => 'as1' ); -is( $assortment->part_type, 'assortment', 'assortment has correct part_type'); -is( scalar @{$assortment->assortment_items}, 2, 'assortment has two parts' ); +is($assortment->part_type, 'assortment', 'assortment has correct part_type'); +is(scalar @{$assortment->assortment_items}, 2, 'assortment has two parts'); +is($assortment->assortment_sellprice_sum, 19.98, 'assortment sellprice sum ok'); +is($assortment->assortment_lastcost_sum, 13.32, 'assortment lastcost sum ok'); my $assortment_item = $assortment->assortment_items->[0]; is( $assortment_item->assortment->partnumber, 'as1', "assortment_item links back to correct assortment"); @@ -41,6 +43,7 @@ sub reset_state { description => "assortment part 1", unit => $unit->name, sellprice => '3.33', + lastcost => '2.22', )->save; $part2 = $part1->clone_and_reset($part1); $part2->partnumber( $part1->partnumber + 1 );