Bugzilla – Attachment 120236 Details for
Bug 28202
Pickup libraries not sorted by name when placing hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28202: Unit test
Bug-28202-Unit-test.patch (text/plain), 3.66 KB, created by
Martin Renvoize (ashimema)
on 2021-04-27 14:10:14 UTC
(
hide
)
Description:
Bug 28202: Unit test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-27 14:10:14 UTC
Size:
3.66 KB
patch
obsolete
>From 467a9793f0c5052a475be69a976e7361b5c0583b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 23 Apr 2021 12:49:33 +0200 >Subject: [PATCH] Bug 28202: Unit test > >Run prove t/db_dependent/Koha/Biblio.t > >Note that sort must be case insensitive. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/Biblio.t | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index c396bd8824..ea5e3f289d 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -185,7 +185,7 @@ subtest 'is_serial() tests' => sub { > }; > > subtest 'pickup_locations' => sub { >- plan tests => 8; >+ plan tests => 9; > > $schema->storage->txn_begin; > >@@ -205,14 +205,14 @@ subtest 'pickup_locations' => sub { > my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); > my $root3 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); > >- my $library1 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library2 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library3 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 0 } } ); >- my $library4 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library5 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library6 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library7 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1 } } ); >- my $library8 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 0 } } ); >+ my $library1 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'zzz' } } ); >+ my $library2 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'AAA' } } ); >+ my $library3 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 0, branchname => 'FFF' } } ); >+ my $library4 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'CCC' } } ); >+ my $library5 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'eee' } } ); >+ my $library6 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'BBB' } } ); >+ my $library7 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, branchname => 'DDD' } } ); >+ my $library8 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 0, branchname => 'GGG' } } ); > > our @branchcodes = map { $_->branchcode } ($library1, $library2, $library3, $library4, $library5, $library6, $library7, $library8); > >@@ -413,6 +413,13 @@ subtest 'pickup_locations' => sub { > } > } > >+ my @pl_names = map { $_->branchname } $biblio1->pickup_locations( { patron => $patron1 } )->as_list; >+ my $pl_ori_str = join('|', @pl_names); >+ my $pl_sorted_str = join('|', sort { lc($a) cmp lc($b) } @pl_names); >+ ok( >+ $pl_ori_str eq $pl_sorted_str, >+ 'Libraries must be sorted by name' >+ ); > $schema->storage->txn_rollback; > }; > >-- >2.20.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 28202
:
120039
|
120049
|
120050
|
120142
|
120143
| 120236 |
120237