Bugzilla – Attachment 176308 Details for
Bug 14907
Item search: call numbers in item search results are ordered alphabetically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14907: Unit tests
Bug-14907-Unit-tests.patch (text/plain), 2.21 KB, created by
Marcel de Rooy
on 2025-01-10 08:04:48 UTC
(
hide
)
Description:
Bug 14907: Unit tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-01-10 08:04:48 UTC
Size:
2.21 KB
patch
obsolete
>From 5ec8c2c0a1a5b15110ebc79bdffa3e0804988acb Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 19 Nov 2024 14:48:54 +0000 >Subject: [PATCH] Bug 14907: Unit tests >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Gretchen Maxeiner <maxeinerGL@gcc.edu> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Items.t | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index db90d09439..1954162a0a 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -283,7 +283,7 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { > }; > > subtest 'SearchItems test' => sub { >- plan tests => 20; >+ plan tests => 21; > > $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; >@@ -539,6 +539,37 @@ subtest 'SearchItems test' => sub { > ($items, $total_results) = SearchItems($filter,$params); > is($items->[0]->{barcode}, $item1->barcode, 'Items sorted as expected by availability'); > >+ subtest 'Sort items by callnumber' => sub { >+ plan tests => 2; >+ >+ # Add two items >+ my $item1 = $builder->build_sample_item( >+ { >+ itemcallnumber => 'D102.D3 1930', >+ cn_source => 'lcc' >+ } >+ ); >+ my $item2 = $builder->build_sample_item( >+ { >+ library => $item1->homebranch, >+ itemcallnumber => 'D1015.B4 1965', >+ cn_source => 'lcc' >+ } >+ ); >+ my $filter = { >+ field => 'homebranch', >+ query => $item1->homebranch, >+ operator => '=', >+ }; >+ my $params = { >+ sortby => 'itemcallnumber', >+ sortorder => 'DESC', >+ }; >+ ( $items, $total_results ) = SearchItems( $filter, $params ); >+ is( $items->[0]->{barcode}, $item2->barcode, 'Items sorted by cn_sort correctly' ); >+ is( $items->[1]->{barcode}, $item1->barcode, 'Items sorted by cn_sort correctly' ); >+ }; >+ > subtest 'Search items by ISSN and ISBN with variations' => sub { > plan tests => 4; > >-- >2.39.5
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 14907
:
174793
|
174794
|
174861
|
174862
|
174990
| 176308 |
176309