Bugzilla – Attachment 52229 Details for
Bug 16500
Catch two warns in TestBuilder.t with warning_like
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists
Bug-16500-Do-not-try-to-insert-MPL-if-already-exis.patch (text/plain), 1.16 KB, created by
Jonathan Druart
on 2016-06-10 14:13:02 UTC
(
hide
)
Description:
[COUNTER-PATCH] Bug 16500: Do not try to insert MPL if already exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-10 14:13:02 UTC
Size:
1.16 KB
patch
obsolete
>From b449a619b86dd47ff5d835b14e1b824c961e9aeb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 10 Jun 2016 15:11:51 +0100 >Subject: [PATCH] Bug 16500: Do not try to insert MPL if already exists > >--- > t/db_dependent/TestBuilder.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t >index 724f32d..dc9d121 100644 >--- a/t/db_dependent/TestBuilder.t >+++ b/t/db_dependent/TestBuilder.t >@@ -24,6 +24,7 @@ use Test::Warn; > use Data::Dumper qw(Dumper); > > use Koha::Database; >+use Koha::Libraries; > > BEGIN { > use_ok('t::lib::TestBuilder'); >@@ -53,7 +54,9 @@ subtest 'Start with some trivial tests' => sub { > > # return undef if a record exists > my $param = { source => 'Branch', value => { branchcode => 'MPL' } }; >- $builder->build( $param ); # at least it should exist now >+ unless ( Koha::Libraries->find( 'MPL' ) ) { >+ $builder->build( $param ); # at least it should exist now >+ } > warning_like { $builder->build( $param ) } > qr/Violation of unique constraint/, > 'Catch warn on adding existing record'; >-- >2.8.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 16500
:
51437
|
51770
|
51851
|
52229
|
52300
|
52335
|
52336
|
52337