Bugzilla – Attachment 168917 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.46 KB, created by
Martin Renvoize (ashimema)
on 2024-07-12 14:24:57 UTC
(
hide
)
Description:
Bug 37316: Add tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-07-12 14:24:57 UTC
Size:
1.46 KB
patch
obsolete
>From 150075d03a18f1589cf2df826900f5514d237174 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 5df382edf50..5b21086e227 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.45.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