| Lines 156-161
          subtest "as_marc_field() tests" => sub {
      
      
        Link Here | 
        
          | 156 | }; | 156 | }; | 
        
          | 157 |  | 157 |  | 
        
          | 158 | subtest 'pickup_locations' => sub { | 158 | subtest 'pickup_locations' => sub { | 
            
              |  |  | 159 |     plan tests => 66; | 
        
          | 159 |  | 160 |  | 
        
          | 160 |     $schema->storage->txn_begin; | 161 |     $schema->storage->txn_begin; | 
        
          | 161 |  | 162 |  | 
  
    | Lines 173-178
          subtest 'pickup_locations' => sub {
      
      
        Link Here | 
        
          | 173 |     my $group2_1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library3->branchcode } } ); | 174 |     my $group2_1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library3->branchcode } } ); | 
        
          | 174 |     my $group2_2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library4->branchcode } } ); | 175 |     my $group2_2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library4->branchcode } } ); | 
        
          | 175 |  | 176 |  | 
            
              |  |  | 177 |     our @branchcodes = ( | 
            
              | 178 |         $library1->branchcode, $library2->branchcode, | 
            
              | 179 |         $library3->branchcode, $library4->branchcode | 
            
              | 180 |     ); | 
        
          | 176 |  | 181 |  | 
        
          | 177 |     my $item1 = $builder->build_sample_item( | 182 |     my $item1 = $builder->build_sample_item( | 
        
          | 178 |         { | 183 |         { | 
  
    | Lines 208-214
          subtest 'pickup_locations' => sub {
      
      
        Link Here | 
        
          | 208 |     my $patron4 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library4->branchcode, firstname => '4' } } ); | 213 |     my $patron4 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library4->branchcode, firstname => '4' } } ); | 
        
          | 209 |  | 214 |  | 
        
          | 210 |     my $all_count = Koha::Libraries->search({ pickup_location => 1})->count(); | 215 |     my $all_count = Koha::Libraries->search({ pickup_location => 1})->count(); | 
            
              | 211 |     plan tests => ($all_count +1) * 7 + 31 + 61; |  |  | 
        
          | 212 |  | 216 |  | 
        
          | 213 |     my $results = { | 217 |     my $results = { | 
        
          | 214 |         "1-1-1-any"           => $all_count, | 218 |         "1-1-1-any"           => $all_count, | 
  
    | Lines 291-296
          subtest 'pickup_locations' => sub {
      
      
        Link Here | 
        
          | 291 |         my $ha_value=$ha==3?'holdgroup':($ha==2?'any':'homebranch'); | 295 |         my $ha_value=$ha==3?'holdgroup':($ha==2?'any':'homebranch'); | 
        
          | 292 |  | 296 |  | 
        
          | 293 |         foreach my $pickup_location (@pl) { | 297 |         foreach my $pickup_location (@pl) { | 
            
              |  |  | 298 |             next | 
            
              | 299 |                 unless grep { $pickup_location eq $_ } @branchcodes; | 
        
          | 294 |             is( ref($pickup_location), 'Koha::Library', 'Object type is correct' ); | 300 |             is( ref($pickup_location), 'Koha::Library', 'Object type is correct' ); | 
        
          | 295 |         } | 301 |         } | 
        
          | 296 |         ok( | 302 |         ok( | 
            
              | 297 | -  |  |  |