Lines 641-647
subtest 'set_waiting+patron_expiration_date' => sub {
Link Here
|
641 |
}; |
641 |
}; |
642 |
}; |
642 |
}; |
643 |
|
643 |
|
644 |
subtest 'count_grouped' => sub { |
644 |
subtest 'count_holds' => sub { |
645 |
plan tests => 3; |
645 |
plan tests => 3; |
646 |
$schema->storage->txn_begin; |
646 |
$schema->storage->txn_begin; |
647 |
|
647 |
|
Lines 658-664
subtest 'count_grouped' => sub {
Link Here
|
658 |
}, |
658 |
}, |
659 |
}); |
659 |
}); |
660 |
|
660 |
|
661 |
is($patron->holds->count_grouped, 1, 'Test patron has 1 hold.'); |
661 |
is($patron->holds->count_holds, 1, 'Test patron has 1 hold.'); |
662 |
|
662 |
|
663 |
my $hold_group = $builder->build_object({ |
663 |
my $hold_group = $builder->build_object({ |
664 |
class => 'Koha::HoldGroups', |
664 |
class => 'Koha::HoldGroups', |
Lines 679-685
subtest 'count_grouped' => sub {
Link Here
|
679 |
} |
679 |
} |
680 |
}); |
680 |
}); |
681 |
|
681 |
|
682 |
is($patron->holds->count_grouped, 2, 'Test patron has 2 holds.'); |
682 |
is($patron->holds->count_holds, 2, 'Test patron has 2 holds.'); |
683 |
|
683 |
|
684 |
my $hold_group2 = $builder->build_object({ |
684 |
my $hold_group2 = $builder->build_object({ |
685 |
class => 'Koha::HoldGroups', |
685 |
class => 'Koha::HoldGroups', |
Lines 707-713
subtest 'count_grouped' => sub {
Link Here
|
707 |
} |
707 |
} |
708 |
}); |
708 |
}); |
709 |
|
709 |
|
710 |
is($patron->holds->count_grouped, 3, 'Test patron has 3 holds.'); |
710 |
is($patron->holds->count_holds, 3, 'Test patron has 3 holds.'); |
711 |
|
711 |
|
712 |
$schema->storage->txn_rollback; |
712 |
$schema->storage->txn_rollback; |
713 |
}; |
713 |
}; |
714 |
- |
|
|