View | Details | Raw Unified | Return to bug 26462
Collapse All | Expand All

(-)a/t/db_dependent/Holds.t (-23 lines)
Lines 633-643 subtest 'CanItemBeReserved / holds_per_day tests' => sub { Link Here
633
633
634
    $schema->storage->txn_begin;
634
    $schema->storage->txn_begin;
635
635
636
    Koha::Holds->search->delete;
637
    $dbh->do('DELETE FROM issues');
638
    Koha::Items->search->delete;
639
    Koha::Biblios->search->delete;
640
641
    my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes' } );
636
    my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes' } );
642
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
637
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
643
    my $patron   = $builder->build_object( { class => 'Koha::Patrons' } );
638
    my $patron   = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 650-656 subtest 'CanItemBeReserved / holds_per_day tests' => sub { Link Here
650
    my $biblio_3 = $builder->build_sample_biblio({ itemtype => $itemtype->itemtype });
645
    my $biblio_3 = $builder->build_sample_biblio({ itemtype => $itemtype->itemtype });
651
    my $itemnumber_3 = $builder->build_sample_item({ library => $library->branchcode, biblionumber => $biblio_3->biblionumber})->itemnumber;
646
    my $itemnumber_3 = $builder->build_sample_item({ library => $library->branchcode, biblionumber => $biblio_3->biblionumber})->itemnumber;
652
647
653
    Koha::CirculationRules->search->delete;
654
    Koha::CirculationRules->set_rules(
648
    Koha::CirculationRules->set_rules(
655
        {
649
        {
656
            categorycode => '*',
650
            categorycode => '*',
Lines 818-826 subtest 'CanItemBeReserved / branch_not_in_hold_group' => sub { Link Here
818
812
819
    $schema->storage->txn_begin;
813
    $schema->storage->txn_begin;
820
814
821
    # Cleanup database
822
    Koha::Holds->search->delete;
823
    $dbh->do('DELETE FROM issues');
824
    Koha::CirculationRules->set_rule(
815
    Koha::CirculationRules->set_rule(
825
        {
816
        {
826
            branchcode   => undef,
817
            branchcode   => undef,
Lines 831-839 subtest 'CanItemBeReserved / branch_not_in_hold_group' => sub { Link Here
831
        }
822
        }
832
    );
823
    );
833
824
834
    Koha::Items->search->delete;
835
    Koha::Biblios->search->delete;
836
837
    # Create item types
825
    # Create item types
838
    my $itemtype1 = $builder->build_object( { class => 'Koha::ItemTypes' } );
826
    my $itemtype1 = $builder->build_object( { class => 'Koha::ItemTypes' } );
839
    my $itemtype2 = $builder->build_object( { class => 'Koha::ItemTypes' } );
827
    my $itemtype2 = $builder->build_object( { class => 'Koha::ItemTypes' } );
Lines 1038-1047 subtest 'CanItemBeReserved / pickup_not_in_hold_group' => sub { Link Here
1038
    plan tests => 9;
1026
    plan tests => 9;
1039
1027
1040
    $schema->storage->txn_begin;
1028
    $schema->storage->txn_begin;
1041
1042
    # Cleanup database
1043
    Koha::Holds->search->delete;
1044
    $dbh->do('DELETE FROM issues');
1045
    Koha::CirculationRules->set_rule(
1029
    Koha::CirculationRules->set_rule(
1046
        {
1030
        {
1047
            branchcode   => undef,
1031
            branchcode   => undef,
Lines 1052-1060 subtest 'CanItemBeReserved / pickup_not_in_hold_group' => sub { Link Here
1052
        }
1036
        }
1053
    );
1037
    );
1054
1038
1055
    Koha::Items->search->delete;
1056
    Koha::Biblios->search->delete;
1057
1058
    # Create item types
1039
    # Create item types
1059
    my $itemtype1 = $builder->build_object( { class => 'Koha::ItemTypes' } );
1040
    my $itemtype1 = $builder->build_object( { class => 'Koha::ItemTypes' } );
1060
    my $itemtype2 = $builder->build_object( { class => 'Koha::ItemTypes' } );
1041
    my $itemtype2 = $builder->build_object( { class => 'Koha::ItemTypes' } );
Lines 1260-1268 subtest 'non priority holds' => sub { Link Here
1260
1241
1261
    $schema->storage->txn_begin;
1242
    $schema->storage->txn_begin;
1262
1243
1263
    # Cleanup database
1264
    Koha::Holds->search->delete;
1265
    $dbh->do('DELETE FROM issues');
1266
    Koha::CirculationRules->set_rules(
1244
    Koha::CirculationRules->set_rules(
1267
        {
1245
        {
1268
            branchcode   => undef,
1246
            branchcode   => undef,
1269
- 

Return to bug 26462