From: G. Richardson Date: Mon, 7 Aug 2017 19:57:33 +0000 (+0200) Subject: t/wh/transfer.t - Refactoring mit SL::Dev::Part::create_part X-Git-Tag: release-3.5.4~907 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b5eae4e1c9d734c8a820e7b380e46108c41924f8;p=kivitendo-erp.git t/wh/transfer.t - Refactoring mit SL::Dev::Part::create_part --- diff --git a/t/wh/transfer.t b/t/wh/transfer.t index 2a05c55d3..c3cf1e5fc 100644 --- a/t/wh/transfer.t +++ b/t/wh/transfer.t @@ -3,6 +3,8 @@ use Test::More; use lib 't'; +use SL::Dev::Part; + use_ok 'Support::TestSetup'; use_ok 'SL::DB::Bin'; use_ok 'SL::DB::Part'; @@ -26,8 +28,7 @@ SL::DB::Manager::Bin ->delete_all(where => [ or => [ description => NAME() SL::DB::Manager::Warehouse->delete_all(where => [ description => NAME() ]); # Create test data -$part = SL::DB::Part->new(unit => 'mg', description => NAME(), partnumber => NAME(), part_type => 'part'); -$part->save(); +$part = SL::Dev::Part::create_part(unit => 'mg', description => NAME(), partnumber => NAME())->save(); is(ref($part), 'SL::DB::Part', 'loading a part to test with id ' . $part->id);