Revision 63410aa6
Von Sven Schöling vor mehr als 7 Jahren hinzugefügt
t/part/assembly.t | ||
---|---|---|
7 | 7 |
use SL::DB::Unit; |
8 | 8 |
use SL::DB::Part; |
9 | 9 |
use SL::DB::Assembly; |
10 |
use SL::Dev::Part; |
|
10 |
use SL::Dev::Part qw(new_assembly);
|
|
11 | 11 |
use SL::DB::Helper::ValidateAssembly; |
12 | 12 |
|
13 | 13 |
Support::TestSetup::login(); |
... | ... | |
32 | 32 |
|
33 | 33 |
|
34 | 34 |
|
35 |
my $assembly2_part = SL::Dev::Part::create_assembly( partnumber => '20000', assnumber => 'as2' )->save;
|
|
35 |
my $assembly2_part = new_assembly( partnumber => '20000', assnumber => 'as2' )->save;
|
|
36 | 36 |
my $retval = validate_assembly($assembly_part,$assembly2_part); |
37 | 37 |
ok(!defined $retval, 'assembly 19000 can be child of assembly 20000' ); |
38 | 38 |
$assembly2_part->add_assemblies(SL::DB::Assembly->new(parts_id => $assembly_part->id, qty => 3, bom => 1)); |
39 | 39 |
$assembly2_part->save; |
40 | 40 |
|
41 |
my $assembly3_part = SL::Dev::Part::create_assembly( partnumber => '30000', assnumber => 'as3' )->save;
|
|
41 |
my $assembly3_part = new_assembly( partnumber => '30000', assnumber => 'as3' )->save;
|
|
42 | 42 |
$retval = validate_assembly($assembly3_part,$assembly_part); |
43 | 43 |
ok(!defined $retval, 'assembly 30000 can be child of assembly 19000' ); |
44 | 44 |
|
... | ... | |
92 | 92 |
sub reset_state { |
93 | 93 |
my %params = @_; |
94 | 94 |
|
95 |
my $assembly = SL::Dev::Part::create_assembly( assnumber => '19000', partnumber => '19000' )->save;
|
|
95 |
my $assembly = new_assembly( assnumber => '19000', partnumber => '19000' )->save;
|
|
96 | 96 |
}; |
97 | 97 |
|
98 | 98 |
1; |
Auch abrufbar als: Unified diff
Tests: SL::Dev Änderungen übernommen