Revision 8d0e5920
Von Kivitendo Admin vor etwa 1 Jahr hinzugefügt
t/db_helper/record_links.t | ||
---|---|---|
222 | 222 |
is $links->[0]->{_record_link_direction}, 'from', '_record_link_direction from'; |
223 | 223 |
is $links->[0]->{_record_link}->to_id, $o1->id, '_record_link from'; |
224 | 224 |
|
225 |
# check if bidi returns an array of links even if aready existing |
|
225 |
# check if bidi returns an array of links even if already existing
|
|
226 | 226 |
my @links = $d->link_to_record($o2, bidirectional => 1); |
227 | 227 |
# at this point the structure is: |
228 | 228 |
# |
... | ... | |
306 | 306 |
$links = $o1->linked_records(direction => 'to', recursive => 1, save_path => 1); |
307 | 307 |
is @$links, 4, 'recursive finds all 4 (backlink to self because of bidi o1<->o2)'; |
308 | 308 |
|
309 |
# because of the link o1->d the longest path should be legth 2. test that |
|
309 |
# because of the link o1->d the longest path should be length 2. test that
|
|
310 | 310 |
is max(map { $_->{_record_link_depth} } @$links), 2, 'longest path is 2'; |
311 | 311 |
|
312 | 312 |
$links = $o2->linked_records(direction => 'to', recursive => 1); |
Auch abrufbar als: Unified diff
Typos in Kommentaren