| 
      
            Lines 153-159
          subtest 'get_column' => sub {
      
      
        Link Here
      
     | 
  
        
          | 153 | 
          };  | 
          153 | 
          };  | 
        
        
          | 154 | 
           | 
          154 | 
           | 
        
        
          | 155 | 
          subtest 'discard_changes' => sub { | 
          155 | 
          subtest 'discard_changes' => sub { | 
        
          
            
              | 156 | 
                  plan tests => 1;  | 
              156 | 
                  plan tests => 3;  | 
            
        
          | 157 | 
           | 
          157 | 
           | 
        
        
          | 158 | 
              $schema->storage->txn_begin;  | 
          158 | 
              $schema->storage->txn_begin;  | 
        
        
          | 159 | 
           | 
          159 | 
           | 
        
  
    | 
      
            Lines 166-171
          subtest 'discard_changes' => sub {
      
      
        Link Here
      
     | 
  
        
          | 166 | 
                  dt_from_string->truncate( to => 'day' ),  | 
          166 | 
                  dt_from_string->truncate( to => 'day' ),  | 
        
        
          | 167 | 
                  'discard_changes should refresh the object'  | 
          167 | 
                  'discard_changes should refresh the object'  | 
        
        
          | 168 | 
              );  | 
          168 | 
              );  | 
        
            
               | 
               | 
              169 | 
                  my $cardnumber   = $patron->cardnumber;  | 
            
            
              | 170 | 
                  my $categorycode = $patron->categorycode;  | 
            
            
              | 171 | 
                  my $branchcode   = $patron->branchcode;  | 
            
            
              | 172 | 
                  $patron->delete;  | 
            
            
              | 173 | 
               | 
            
            
              | 174 | 
                  $patron =  | 
            
            
              | 175 | 
                      Koha::Patron->new( { cardnumber => $cardnumber, categorycode => $categorycode, branchcode => $branchcode } ) | 
            
            
              | 176 | 
                      ->store->discard_changes;  | 
            
            
              | 177 | 
               | 
            
            
              | 178 | 
                  is( ref($patron), 'Koha::Patron', 'discard_changes should return a Koha::Object object' );  | 
            
            
              | 179 | 
                  isnt( $patron->updated_on, undef, 'discard_changes should have fetched the row from the DB' );  | 
            
        
          | 169 | 
           | 
          180 | 
           | 
        
        
          | 170 | 
              $schema->storage->txn_rollback;  | 
          181 | 
              $schema->storage->txn_rollback;  | 
        
        
          | 171 | 
          };  | 
          182 | 
          };  | 
        
            
              | 172 | 
              -   | 
               | 
               |