View | Details | Raw Unified | Return to bug 34357
Collapse All | Expand All

(-)a/Koha/ItemType.pm (-1 / +1 lines)
Lines 86-92 sub delete { Link Here
86
86
87
sub image_location {
87
sub image_location {
88
    my ( $self, $interface ) = @_;
88
    my ( $self, $interface ) = @_;
89
    return C4::Koha::getitemtypeimagelocation( $interface, $self->SUPER::imageurl );
89
    return C4::Koha::getitemtypeimagelocation( $interface, $self->imageurl );
90
}
90
}
91
91
92
=head3 translated_description
92
=head3 translated_description
(-)a/t/db_dependent/Koha/ItemTypes.t (-3 / +18 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Data::Dumper;
22
use Test::More tests => 15;
23
use Test::More tests => 14;
24
23
25
use t::lib::Mocks;
24
use t::lib::Mocks;
26
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
Lines 134-137 $biblio->delete; Link Here
134
133
135
is ( $item_type->can_be_deleted, 1, 'The item type that was being used by the removed item and biblioitem can now be deleted' );
134
is ( $item_type->can_be_deleted, 1, 'The item type that was being used by the removed item and biblioitem can now be deleted' );
136
135
136
subtest 'image_location' => sub {
137
    plan tests => 3;
138
139
    my $item_type = $builder->build_object( { class => 'Koha::ItemTypes' } );
140
    $item_type->imageurl('https://myserver.org/image01');
141
    is( $item_type->image_location, 'https://myserver.org/image01', 'Check URL' );
142
    $item_type->imageurl('bridge/newthing.png');
143
    is(
144
        $item_type->image_location('opac'), '/opac-tmpl/bootstrap/itemtypeimg/bridge/newthing.png',
145
        'Check path for opac'
146
    );
147
    is(
148
        $item_type->image_location('intranet'), '/intranet-tmpl/prog/img/itemtypeimg/bridge/newthing.png',
149
        'Check path for intranet'
150
    );
151
};
152
137
$schema->txn_rollback;
153
$schema->txn_rollback;
138
- 

Return to bug 34357