Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e63e6914

Von Sven Schöling vor fast 8 Jahren hinzugefügt

  • ID e63e691453b3cb079566b986ba31f31dcfa295ff
  • Vorgänger 2657ce87
  • Nachfolger b9f5d35e

t/part/assembly.t: nicht mit undef vergleichen

Unterschiede anzeigen:

t/part/assembly.t
34 34

  
35 35
my $assembly2_part = SL::Dev::Part::create_assembly( partnumber => '20000', part1number => 'ap2', assnumber => 'as2' )->save;
36 36
my $retval = validate_assembly($assembly_part,$assembly2_part);
37
ok( $retval eq undef , 'assembly 19000 can be child of assembly 20000' );
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 41
my $assembly3_part = SL::Dev::Part::create_assembly( partnumber => '30000', part1number => 'ap3', assnumber => 'as3' )->save;
42 42
$retval = validate_assembly($assembly3_part,$assembly_part);
43
ok( $retval eq undef , 'assembly 30000 can be child of assembly 19000' );
43
ok(!defined $retval, 'assembly 30000 can be child of assembly 19000' );
44 44

  
45 45
$retval = validate_assembly($assembly3_part,$assembly2_part);
46
ok( $retval eq undef , 'assembly 30000 can be child of assembly 20000' );
46
ok(!defined $retval, 'assembly 30000 can be child of assembly 20000' );
47 47

  
48 48
$assembly_part->add_assemblies(SL::DB::Assembly->new(parts_id => $assembly3_part->id, qty => 4, bom => 1));
49 49
$assembly_part->save;
50 50

  
51 51
$retval = validate_assembly($assembly3_part,$assembly2_part);
52
ok( $retval eq undef , 'assembly 30000 can be child of assembly 20000' );
52
ok(!defined $retval, 'assembly 30000 can be child of assembly 20000' );
53 53

  
54 54
$assembly2_part->add_assemblies(SL::DB::Assembly->new(parts_id => $assembly3_part->id, qty => 5, bom => 1));
55 55
$assembly2_part->save;

Auch abrufbar als: Unified diff