Bugzilla – Attachment 113921 Details for
Bug 26518
Adding a record can succeed even if adding the biblioitem fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26518: (QA follow-up) Expect warnings, don't supress them
Bug-26518-QA-follow-up-Expect-warnings-dont-supres.patch (text/plain), 1.70 KB, created by
Nick Clemens (kidclamp)
on 2020-11-23 12:11:14 UTC
(
hide
)
Description:
Bug 26518: (QA follow-up) Expect warnings, don't supress them
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-11-23 12:11:14 UTC
Size:
1.70 KB
patch
obsolete
>From 4aa1026e4f0e36f5e6ac426fd0e21970cec96a20 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 23 Nov 2020 12:09:47 +0000 >Subject: [PATCH] Bug 26518: (QA follow-up) Expect warnings, don't supress them > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Biblio.t | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index 309b8534c7..ac6a6a1255 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -19,6 +19,7 @@ use Modern::Perl; > > use Test::More tests => 15; > use Test::MockModule; >+use Test::Warn; > use List::MoreUtils qw( uniq ); > use MARC::Record; > >@@ -43,7 +44,7 @@ Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); > my $builder = t::lib::TestBuilder->new; > > subtest 'AddBiblio' => sub { >- plan tests => 3; >+ plan tests => 4; > > my $marcflavour = 'MARC21'; > t::lib::Mocks::mock_preference( 'marcflavour', $marcflavour ); >@@ -56,12 +57,9 @@ subtest 'AddBiblio' => sub { > > my $nb_biblios = Koha::Biblios->count; > my ( $biblionumber, $biblioitemnumber ); >- { >- local *STDERR; >- open STDERR, '>', '/dev/null'; >- ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( $record, '' ); >- close STDERR; >- } >+ warnings_like { ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( $record, '' ) } >+ [ qr/Data too long for column 'lccn'/, qr/Data too long for column 'lccn'/ ], >+ "expected warnings when adding too long LCCN"; > is( $biblionumber, undef, > 'AddBiblio returns undef for biblionumber if something went wrong' ); > is( $biblioitemnumber, undef, >-- >2.11.0
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 26518
:
110902
|
110903
|
111387
|
111389
|
111512
|
111513
|
111514
|
111515
|
113046
|
113671
|
113672
|
113673
|
113674
|
113917
|
113918
|
113919
|
113920
| 113921