|
Lines 406-412
subtest 'Get shelves' => sub {
Link Here
|
| 406 |
|
406 |
|
| 407 |
subtest 'Get shelves containing biblios' => sub { |
407 |
subtest 'Get shelves containing biblios' => sub { |
| 408 |
|
408 |
|
| 409 |
plan tests => 9; |
409 |
plan tests => 11; |
| 410 |
my $patron1 = $builder->build( { source => 'Borrower', } ); |
410 |
my $patron1 = $builder->build( { source => 'Borrower', } ); |
| 411 |
my $patron2 = $builder->build( { source => 'Borrower', } ); |
411 |
my $patron2 = $builder->build( { source => 'Borrower', } ); |
| 412 |
my $biblio1 = $builder->build( { source => 'Biblio', } ); |
412 |
my $biblio1 = $builder->build( { source => 'Biblio', } ); |
|
Lines 489-494
subtest 'Get shelves containing biblios' => sub {
Link Here
|
| 489 |
is ( $shelves_with_biblio4_for_patron2->count, 2, 'Patron should shown private and public lists for a given biblio' ); |
489 |
is ( $shelves_with_biblio4_for_patron2->count, 2, 'Patron should shown private and public lists for a given biblio' ); |
| 490 |
is ( $shelves_with_biblio4_for_patron2->next->shelfname, $shelf3->shelfname, 'The shelves should be sorted by shelfname' ); |
490 |
is ( $shelves_with_biblio4_for_patron2->next->shelfname, $shelf3->shelfname, 'The shelves should be sorted by shelfname' ); |
| 491 |
|
491 |
|
|
|
492 |
# Test list_biblionumbers |
| 493 |
my $biblios = $shelf2->list_biblionumbers; |
| 494 |
is( @$biblios, 3, 'Three biblionumbers expected' ); |
| 495 |
my @filtered = grep { $_ eq $biblio2->{biblionumber}; } @$biblios; |
| 496 |
is( @filtered, 1, 'Biblio2 included' ); |
| 497 |
|
| 492 |
teardown(); |
498 |
teardown(); |
| 493 |
}; |
499 |
}; |
| 494 |
|
500 |
|
| 495 |
- |
|
|