Bugzilla – Attachment 66923 Details for
Bug 15339
TestBuilder build parameter warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15339: Improve parameter validation
Bug-15339-Improve-parameter-validation.patch (text/plain), 1.50 KB, created by
Marcel de Rooy
on 2017-09-07 10:10:11 UTC
(
hide
)
Description:
Bug 15339: Improve parameter validation
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-09-07 10:10:11 UTC
Size:
1.50 KB
patch
obsolete
>From 8f39c860a77161b7da6ff894f18991394bd9d469 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Sep 2017 13:41:47 -0300 >Subject: [PATCH] Bug 15339: Improve parameter validation >Content-Type: text/plain; charset=utf-8 > >Only value and source are allowed > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/TestBuilder.t | 2 +- > t/lib/TestBuilder.pm | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t >index c370b5a..5ef269f 100644 >--- a/t/db_dependent/TestBuilder.t >+++ b/t/db_dependent/TestBuilder.t >@@ -397,7 +397,7 @@ subtest '->build parameter' => sub { > warnings_are { > $builder->build({ > source => 'Branch', >- values => { >+ value => { > branchcode => 'BRANCH_1' > } > }) >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 45df23e..1b56f92 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -89,7 +89,7 @@ sub build { > my $source = $params->{source} || return; > my $value = $params->{value}; > >- my @unknowns = grep( !/source|value|only_fk/, keys %{ $params }); >+ my @unknowns = grep( !/^(source|value)$/, keys %{ $params }); > carp "Unknown parameter(s): ", join( ', ', @unknowns ) if scalar @unknowns; > > my $col_values = $self->_buildColumnValues({ >-- >2.1.4
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 15339
:
45527
|
45528
|
66892
|
66893
|
66894
|
66921
|
66922
| 66923 |
66924
|
66951