Lines 82-88
subtest 'holds' => sub {
Link Here
|
82 |
biblionumber => $biblio->biblionumber, |
82 |
biblionumber => $biblio->biblionumber, |
83 |
}); |
83 |
}); |
84 |
$nb_of_items++; |
84 |
$nb_of_items++; |
85 |
is($item->holds(), undef, "Nothing returned if no holds"); |
85 |
is($item->holds->count, 0, "Nothing returned if no holds"); |
86 |
my $hold1 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'T' }}); |
86 |
my $hold1 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'T' }}); |
87 |
my $hold2 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); |
87 |
my $hold2 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); |
88 |
my $hold3 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); |
88 |
my $hold3 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); |
Lines 90-96
subtest 'holds' => sub {
Link Here
|
90 |
is($item->holds()->count,3,"Three holds found"); |
90 |
is($item->holds()->count,3,"Three holds found"); |
91 |
is($item->holds({found => 'W'})->count,2,"Two waiting holds found"); |
91 |
is($item->holds({found => 'W'})->count,2,"Two waiting holds found"); |
92 |
is_deeply($item->holds({found => 'T'})->next->unblessed,$hold1,"Found transit holds matches the hold"); |
92 |
is_deeply($item->holds({found => 'T'})->next->unblessed,$hold1,"Found transit holds matches the hold"); |
93 |
is($item->holds({found => undef}),undef,"Nothing returned if no matching holds"); |
93 |
is($item->holds({found => undef})->count, 0,"Nothing returned if no matching holds"); |
94 |
}; |
94 |
}; |
95 |
|
95 |
|
96 |
subtest 'biblio' => sub { |
96 |
subtest 'biblio' => sub { |
97 |
- |
|
|