Bugzilla – Attachment 168853 Details for
Bug 37316
Cannot add items to basket via file if barcodes not supplied
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37316: Add tests
Bug-37316-Add-tests.patch (text/plain), 1.40 KB, created by
Lucas Gass (lukeg)
on 2024-07-11 17:24:13 UTC
(
hide
)
Description:
Bug 37316: Add tests
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-07-11 17:24:13 UTC
Size:
1.40 KB
patch
obsolete
>From 38a935143437cc8d1282d18ecc280535473b3d51 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 11 Jul 2024 17:16:32 +0000 >Subject: [PATCH] Bug 37316: Add tests > >--- > t/db_dependent/Koha/Item.t | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 5df382edf5..5b21086e22 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -20,7 +20,7 @@ > use Modern::Perl; > use utf8; > >-use Test::More tests => 34; >+use Test::More tests => 35; > use Test::Exception; > use Test::MockModule; > >@@ -843,6 +843,29 @@ subtest 'request_transfer' => sub { > $schema->storage->txn_rollback; > }; > >+subtest 'store check barcodes' => sub { >+ >+ plan tests => 3; >+ >+ $schema->storage->txn_begin; >+ >+ my $biblio = $builder->build_sample_biblio(); >+ >+ my $item = $builder->build_sample_item( >+ { >+ biblionumber => $biblio->biblionumber, >+ } >+ ); >+ >+ $item->barcode("")->store(); >+ is( $item->barcode, undef, 'Empty string barcodes are treated as undef'); >+ >+ $item->barcode("123456789")->store(); >+ is( $item->barcode, "123456789", 'Non-empty string barcodes are unchanged'); >+ >+ $item->barcode(undef)->store(); >+ is( $item->barcode, undef, 'undef barcodes remain undef'); >+}; > subtest 'deletion' => sub { > plan tests => 15; > >-- >2.39.2
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 37316
:
168767
|
168853
|
168854
|
168855
|
168858
|
168917
|
168918
|
168919