Bugzilla – Attachment 20276 Details for
Bug 10333
UT: Labels/t_Batch.t needs to create its own data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10333: remove_item should be called just one time
Bug-10333-removeitem-should-be-called-just-one-tim.patch (text/plain), 1.28 KB, created by
Jonathan Druart
on 2013-08-12 15:08:56 UTC
(
hide
)
Description:
Bug 10333: remove_item should be called just one time
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-08-12 15:08:56 UTC
Size:
1.28 KB
patch
obsolete
>From dd7f88c4509d3e825052484a7bf4e0e831b03959 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 12 Aug 2013 17:07:38 +0200 >Subject: [PATCH] Bug 10333: remove_item should be called just one time > >If there is no remaining items, the retrieve routine returns -2. >--- > t/db_dependent/Labels/t_Batch.t | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Labels/t_Batch.t b/t/db_dependent/Labels/t_Batch.t >index 3166ce4..c999602 100644 >--- a/t/db_dependent/Labels/t_Batch.t >+++ b/t/db_dependent/Labels/t_Batch.t >@@ -20,7 +20,7 @@ > > use Modern::Perl; > >-use Test::More tests => 33; >+use Test::More tests => 24; > use C4::Context; > use MARC::Record; > use MARC::Field; >@@ -101,9 +101,8 @@ is_deeply($saved_batch, $batch) || diag "Retrieved batch object FAILED to verify > > diag "Testing Batch->remove_item() method."; > >-for my $itemnumber ( @$itemnumbers ) { >- ok($batch->remove_item($itemnumber) eq 0) || diag "Batch->remove_item() FAILED."; >-} >+my $itemnumber = @$itemnumbers[0]; >+ok($batch->remove_item($itemnumber) eq 0) || diag "Batch->remove_item() FAILED."; > > my $updated_batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); > is_deeply($updated_batch, $batch) || diag "Updated batch object FAILED to verify."; >-- >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 10333
:
18384
|
18399
|
19201
|
20276
|
20454
|
20593