| Lines 1-10
          
      
      
        Link Here | 
        
          | 1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl | 
        
          | 2 |  | 2 |  | 
        
          | 3 | use Modern::Perl; | 3 | use Modern::Perl; | 
          
            
              | 4 | use Test::More tests => 8; | 4 | use Test::More tests => 9; | 
            
              |  |  | 5 | use Try::Tiny; | 
        
          | 5 |  | 6 |  | 
            
              | 6 | use C4::Context; |  |  | 
        
          | 7 | use t::lib::TestBuilder; | 7 | use t::lib::TestBuilder; | 
            
              |  |  | 8 |  | 
            
              | 9 | use C4::Context; | 
        
          | 8 | use C4::Members; | 10 | use C4::Members; | 
        
          | 9 |  | 11 |  | 
        
          | 10 | BEGIN { | 12 | BEGIN { | 
  
    | Lines 27-32
          Koha::Patron::Modification->new(
      
      
        Link Here | 
        
          | 27 |     } | 29 |     } | 
        
          | 28 | )->store(); | 30 | )->store(); | 
        
          | 29 |  | 31 |  | 
            
              |  |  | 32 | ## Ensure duplicate verification tokens cannot be added to the database | 
            
              | 33 | try { | 
            
              | 34 |     Koha::Patron::Modification->new( | 
            
              | 35 |         { | 
            
              | 36 |             verification_token => '1234567890', | 
            
              | 37 |             surname            => 'Hall', | 
            
              | 38 |             firstname          => 'Daria' | 
            
              | 39 |         } | 
            
              | 40 |     )->store(); | 
            
              | 41 | } catch { | 
            
              | 42 |     ok( $_->isa('Koha::Exceptions::Koha::Patron::Modification::DuplicateVerificationToken'), | 
            
              | 43 |         'Attempting to add a duplicate verification token to the database should raise a Koha::Exceptions::Koha::Patron::Modification::DuplicateVerificationToken exception' ); | 
            
              | 44 | }; | 
            
              | 45 |  | 
        
          | 30 | ## Get the new pending modification | 46 | ## Get the new pending modification | 
        
          | 31 | my $borrower = | 47 | my $borrower = | 
        
          | 32 |   Koha::Patron::Modifications->find( { verification_token => '1234567890' } ); | 48 |   Koha::Patron::Modifications->find( { verification_token => '1234567890' } ); | 
            
              | 33 | -  |  |  |