From b5eae4e1c9d734c8a820e7b380e46108c41924f8 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 7 Aug 2017 21:57:33 +0200 Subject: [PATCH] t/wh/transfer.t - Refactoring mit SL::Dev::Part::create_part --- t/wh/transfer.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.20.1