Bugzilla – Attachment 120803 Details for
Bug 23406
When using an authorised value for suppression, record doesn't show as suppressed in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23406: Unit test
Bug-23406-Unit-test.patch (text/plain), 1.40 KB, created by
Phil Ringnalda
on 2021-05-10 18:21:42 UTC
(
hide
)
Description:
Bug 23406: Unit test
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2021-05-10 18:21:42 UTC
Size:
1.40 KB
patch
obsolete
>From c6464a27222d8a487e1977f713df53db6b47597f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 10 May 2021 12:01:55 +0000 >Subject: [PATCH] Bug 23406: Unit test > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > t/db_dependent/XSLT.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t >index 87e00a4bf5..37637e6fa8 100755 >--- a/t/db_dependent/XSLT.t >+++ b/t/db_dependent/XSLT.t >@@ -17,7 +17,8 @@ > > use Modern::Perl; > >-use Test::More tests => 2; >+use MARC::Record; >+use Test::More tests => 3; > use Test::Warn; > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -33,6 +34,17 @@ my $builder = t::lib::TestBuilder->new; > > $schema->storage->txn_begin; > >+subtest 'transformMARCXML4XSLT tests' => sub { >+ plan tests => 1; >+ my $mock_xslt = Test::MockModule->new("C4::XSLT"); >+ $mock_xslt->mock( getAuthorisedValues4MARCSubfields => sub { return { 942 => { 'n' => 1 } } } ); >+ $mock_xslt->mock( GetAuthorisedValueDesc => sub { warn "called"; }); >+ my $record = MARC::Record->new(); >+ my $suppress_field = MARC::Field->new( 942, ' ', ' ', n => '1' ); >+ $record->append_fields($suppress_field); >+ warning_is { C4::XSLT::transformMARCXML4XSLT( 3,$record ) } undef, "942n auth value not translated"; >+}; >+ > subtest 'buildKohaItemsNamespace status tests' => sub { > plan tests => 14; > >-- >2.26.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23406
:
120213
|
120719
|
120772
|
120773
|
120803
|
120804
|
120807
|
120808