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

(-)a/t/db_dependent/XSLT.t (-2 / +13 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 2;
20
use MARC::Record;
21
use Test::More tests => 3;
21
use Test::Warn;
22
use Test::Warn;
22
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
23
use t::lib::Mocks;
24
use t::lib::Mocks;
Lines 33-38 my $builder = t::lib::TestBuilder->new; Link Here
33
34
34
$schema->storage->txn_begin;
35
$schema->storage->txn_begin;
35
36
37
subtest 'transformMARCXML4XSLT tests' => sub {
38
    plan tests => 1;
39
    my $mock_xslt =  Test::MockModule->new("C4::XSLT");
40
    $mock_xslt->mock( getAuthorisedValues4MARCSubfields => sub { return { 942 => { 'n' => 1 } } } );
41
    $mock_xslt->mock( GetAuthorisedValueDesc => sub { warn "called"; });
42
    my $record = MARC::Record->new();
43
    my $suppress_field = MARC::Field->new( 942, ' ', ' ', n => '1' );
44
    $record->append_fields($suppress_field);
45
    warning_is { C4::XSLT::transformMARCXML4XSLT( 3,$record ) } undef, "942n auth value not translated";
46
};
47
36
subtest 'buildKohaItemsNamespace status tests' => sub {
48
subtest 'buildKohaItemsNamespace status tests' => sub {
37
    plan tests => 14;
49
    plan tests => 14;
38
50
39
- 

Return to bug 23406