Bugzilla – Attachment 52337 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]
Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists
Bug-16500-QA-Follow-up-Catch-warning-if-branch-MPL.patch (text/plain), 1.54 KB, created by
Jonathan Druart
on 2016-06-13 16:50:37 UTC
(
hide
)
Description:
Bug 16500: [QA Follow-up] Catch warning if branch MPL already exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-13 16:50:37 UTC
Size:
1.54 KB
patch
obsolete
>From dd1a4d53c58846ff4dfdaf1a11eff5ab3f27ad88 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 26 May 2016 21:56:50 +0200 >Subject: [PATCH] Bug 16500: [QA Follow-up] Catch warning if branch MPL already > exists > >The current test had no warnings, when you have no MPL branch, and only >catches the warn from the second build on line 57. If you do have MPL, >a warning comes from line 56. > >This patch fixes it by removing MPL from the test. A new branch is created >first and then we try to create it again. > >Test plan: >Run the test. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/TestBuilder.t | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t >index 724f32d..569b6b4 100644 >--- a/t/db_dependent/TestBuilder.t >+++ b/t/db_dependent/TestBuilder.t >@@ -52,8 +52,8 @@ subtest 'Start with some trivial tests' => sub { > 'Build should not accept a hash for this column'; > > # return undef if a record exists >- my $param = { source => 'Branch', value => { branchcode => 'MPL' } }; >- $builder->build( $param ); # at least it should exist now >+ my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; >+ my $param = { source => 'Branch', value => { branchcode => $branchcode } }; > 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