Bugzilla – Attachment 47978 Details for
Bug 15777
Refactor loop in which Record::Processor does not initialize parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15777 - Test to prove initialization isn't working correctly.
Bug-15777---Test-to-prove-initialization-isnt-work.patch (text/plain), 1.82 KB, created by
Marc Véron
on 2016-02-12 14:25:06 UTC
(
hide
)
Description:
Bug 15777 - Test to prove initialization isn't working correctly.
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-02-12 14:25:06 UTC
Size:
1.82 KB
patch
obsolete
>From 08b9336e4a7c7397c4da4e411448801fe1ad2ecc Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 10 Feb 2016 11:18:40 -0500 >Subject: [PATCH] Bug 15777 - Test to prove initialization isn't working > correctly. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >TEST PLAN >--------- >1) Apply this testing patch >2) prove -v t/RecordProcessor.t > -- tests will fail. >3) run koha qa test tools > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > t/RecordProcessor.t | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/t/RecordProcessor.t b/t/RecordProcessor.t >index 850ad39..ad475d4 100755 >--- a/t/RecordProcessor.t >+++ b/t/RecordProcessor.t >@@ -79,7 +79,7 @@ ok(!$@, 'Destroyed processor successfully'); > > subtest "new() tests" => sub { > >- plan tests => 13; >+ plan tests => 14; > > my $processor; > >@@ -103,11 +103,18 @@ subtest "new() tests" => sub { > is( ref($processor->filters->[1]), 'Koha::Filter::MARC::EmbedSeeFromHeadings', 'Correct second filter initialized' ); > > # Create a processor with both valid and invalid filters. >- $processor = new Koha::RecordProcessor({ filters => [ 'Null', 'Dummy' ] }); >+ # use hash reference for regression testing >+ my $parameters = { >+ filters => [ 'Null', 'Dummy' ], >+ options => { 'test' => 'true' } >+ }; >+ $processor = new Koha::RecordProcessor($parameters); > is( ref($processor), 'Koha::RecordProcessor', 'Processor created' ); > is( scalar @{ $processor->filters }, 1, 'Invalid filter skipped' ); > is( ref($processor->filters->[0]), 'Koha::Filter::MARC::Null', 'Correct filter initialized' ); > >+ my $filter_params = $processor->filters->[0]->params; >+ is_deeply( $filter_params, $parameters, 'Initialization parameters' ); > }; > > done_testing(); >-- >1.7.10.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 15777
:
47941
|
47942
|
47943
|
47978
|
47979
|
47980
|
47988
|
47990
|
47991
|
48000