bug: 2272 - remove warning from C4::Koha::getitemtypeimagedir
[koha.git] / t / lib / KohaTest / Koha / getitemtypeimagedir.pm
1 package KohaTest::Koha::getitemtypeimagedir;
2 use base qw( KohaTest::Koha );
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8
9 use C4::Koha;
10
11 sub check_default : Test( 5 ) {
12     my $self = shift;
13
14     my $opac_directory     = C4::Koha::getitemtypeimagedir('opac');
15     my $default_directory  = C4::Koha::getitemtypeimagedir('opac');
16     my $intranet_directory = C4::Koha::getitemtypeimagedir('intranet');
17
18     ok( $opac_directory,     'the opac directory is defined' );
19     ok( $default_directory,  'the default directory is defined' );
20     ok( $intranet_directory, 'the intranet directory is defined' );
21
22     is( $opac_directory, $default_directory, 'the opac directory is returned as the default' );
23     isnt( $intranet_directory, $default_directory, 'the intranet directory is not the same as the default' );
24
25 }
26
27 1;