From d885aefcd56e827e3f5f19a47636bff17474d804 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Feb 2019 16:02:31 -0300 Subject: [PATCH] Bug 22392: Reuse existing pattern Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- t/lib/TestBuilder.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index 550d4e06ba..286fde76a6 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -175,10 +175,8 @@ sub build_sample_item { my $itype = delete $args->{itype} || $self->build_object( { class => 'Koha::ItemTypes' } )->itemtype; - my $barcode = - exists( $args->{barcode} ) - ? $args->{barcode} - : $self->_gen_text( { info => { size => SIZE_BARCODE } } ); + my $barcode = delete $args->{barcode} + || $self->_gen_text( { info => { size => SIZE_BARCODE } } ); my ( undef, undef, $itemnumber ) = C4::Items::AddItem( { -- 2.39.5