| 
      
            Lines 69-75
          subtest 'store() tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 69 | 
           | 
          69 | 
           | 
        
        
          | 70 | 
          subtest 'fill() tests' => sub { | 
          70 | 
          subtest 'fill() tests' => sub { | 
        
        
          | 71 | 
           | 
          71 | 
           | 
        
          
            
              | 72 | 
                  plan tests => 13;  | 
              72 | 
                  plan tests => 14;  | 
            
        
          | 73 | 
           | 
          73 | 
           | 
        
        
          | 74 | 
              $schema->storage->txn_begin;  | 
          74 | 
              $schema->storage->txn_begin;  | 
        
        
          | 75 | 
           | 
          75 | 
           | 
        
  
    | 
      
            Lines 124-129
          subtest 'fill() tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 124 | 
              is( $old_hold->priority, 0, 'priority set to 0' );  | 
          124 | 
              is( $old_hold->priority, 0, 'priority set to 0' );  | 
        
        
          | 125 | 
              is( $old_hold->found, 'F', 'found set to F' );  | 
          125 | 
              is( $old_hold->found, 'F', 'found set to F' );  | 
        
        
          | 126 | 
           | 
          126 | 
           | 
        
            
               | 
               | 
              127 | 
                  subtest 'itemnumber parameter' => sub { | 
            
            
              | 128 | 
                      plan tests => 1;  | 
            
            
              | 129 | 
                      $category->reservefee(0)->store; # do not disturb later accounts  | 
            
            
              | 130 | 
                      $hold = $builder->build_object({ class => 'Koha::Holds', value => { biblionumber => $biblio->id, borrowernumber => $patron->id, itemnumber => undef, priority => 1 } }); | 
            
            
              | 131 | 
                      # Simulating checkout without confirming hold  | 
            
            
              | 132 | 
                      $hold->fill({ itemnumber => $item->id }); | 
            
            
              | 133 | 
                      $old_hold = Koha::Old::Holds->find($hold->id);  | 
            
            
              | 134 | 
                      is( $old_hold->itemnumber, $item->itemnumber, 'The itemnumber has been saved in old_reserves by fill' );  | 
            
            
              | 135 | 
                      $old_hold->delete;  | 
            
            
              | 136 | 
                      $category->reservefee($fee)->store; # restore  | 
            
            
              | 137 | 
                  };  | 
            
            
              | 138 | 
               | 
            
        
          | 127 | 
              subtest 'fee applied tests' => sub { | 
          139 | 
              subtest 'fee applied tests' => sub { | 
        
        
          | 128 | 
           | 
          140 | 
           | 
        
        
          | 129 | 
                  plan tests => 9;  | 
          141 | 
                  plan tests => 9;  | 
        
            
              | 130 | 
              -   | 
               | 
               |