| Lines 124-139
          subtest 'GetDescriptionByKohaField' => sub {
      
      
        Link Here | 
        
          | 124 |     # Opac display | 124 |     # Opac display | 
        
          | 125 |     my $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 125 |     my $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 
        
          | 126 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_1->authorised_value } ); | 126 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_1->authorised_value } ); | 
          
            
              | 127 |     is( $av, 'lib_opac', 'The OPAC description should be displayed if exists' ); | 127 |     is( $av, 'lib_opac', 'For OPAC: The OPAC description should be displayed if exists' ); | 
        
          | 128 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 128 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 
        
          | 129 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_2->authorised_value } ); | 129 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_2->authorised_value } ); | 
          
            
              | 130 |     is( $av, 'lib', 'The staff description should be displayed if none exists for OPAC' ); | 130 |     is( $av, 'lib', 'For OPAC: The staff description should be displayed if none exists for OPAC' ); | 
        
          | 131 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 131 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 
        
          | 132 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_3->authorised_value } ); | 132 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $av_3->authorised_value } ); | 
          
            
              | 133 |     is( $av, $av_3->authorised_value, 'If both OPAC and staff descriptions are missing, the code should be displayed'); | 133 |     is( $av, $av_3->authorised_value, 'For OPAC: If both OPAC and staff descriptions are missing, the code should be displayed'); | 
        
          | 134 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 134 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 
        
          | 135 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $non_existent_av } ); | 135 |         { opac => 1, kohafield => 'dummy.field', authorised_value => $non_existent_av } ); | 
          
            
              | 136 |     is( $av, $non_existent_av, 'If both OPAC and staff descriptions are missing, the parameter should be displayed'); | 136 |     is( $av, $non_existent_av, 'For OPAC: If both OPAC and staff descriptions are missing, the parameter should be displayed'); | 
        
          | 137 |  | 137 |  | 
        
          | 138 |     # Staff display | 138 |     # Staff display | 
        
          | 139 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 139 |     $av = Koha::Template::Plugin::AuthorisedValues->GetDescriptionByKohaField( | 
            
              | 140 | -  |  |  |