Bugzilla – Attachment 131977 Details for
Bug 26328
incremental barcode generation fails when incorrectly converting strings to numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26328: Add test
Bug-26328-Add-test.patch (text/plain), 1.27 KB, created by
Jonathan Druart
on 2022-03-21 14:57:29 UTC
(
hide
)
Description:
Bug 26328: Add test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-03-21 14:57:29 UTC
Size:
1.27 KB
patch
obsolete
>From ed0c85b8d7d1d9b1bfe72120f63ecaccbcf095dc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 21 Mar 2022 15:56:21 +0100 >Subject: [PATCH] Bug 26328: Add test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Barcodes_ValueBuilder.t | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Barcodes_ValueBuilder.t b/t/db_dependent/Barcodes_ValueBuilder.t >index 980543afc1f..84fcce19834 100755 >--- a/t/db_dependent/Barcodes_ValueBuilder.t >+++ b/t/db_dependent/Barcodes_ValueBuilder.t >@@ -16,7 +16,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 9; > use Test::MockModule; > use t::lib::TestBuilder; > >@@ -75,5 +75,14 @@ ok(length($scr) > 0, 'hbyymmincr javascript'); > is($nextnum, '2012-0035', 'annual barcode'); > is($scr, undef, 'annual javascript'); > >-$schema->storage->txn_rollback; >+$dbh->do(q|DELETE FROM items|); >+my $item_5 = $builder->build_sample_item( >+ { >+ barcode => '978e0143019375' >+ } >+); >+($nextnum, $scr) = C4::Barcodes::ValueBuilder::incremental::get_barcode(\%args); >+is($nextnum, '979', 'incremental barcode'); >+is($scr, undef, 'incremental javascript'); > >+$schema->storage->txn_rollback; >-- >2.25.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 26328
:
114179
|
131592
|
131976
| 131977