Bugzilla – Attachment 135821 Details for
Bug 11889
Option to keep public or shared lists when deleting patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11889: (QA follow-up) Fix tests
Bug-11889-QA-follow-up-Fix-tests.patch (text/plain), 3.29 KB, created by
Marcel de Rooy
on 2022-06-08 14:57:30 UTC
(
hide
)
Description:
Bug 11889: (QA follow-up) Fix tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-08 14:57:30 UTC
Size:
3.29 KB
patch
obsolete
>From 2176fdcc15f6e6bbcf903eebaed5a8f016370f03 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 8 Jun 2022 14:35:31 +0000 >Subject: [PATCH] Bug 11889: (QA follow-up) Fix tests >Content-Type: text/plain; charset=utf-8 > >Noise from 28959 changing category to public. >--- > t/db_dependent/Koha/Patrons.t | 21 ++++++++++++--------- > t/db_dependent/Virtualshelves.t | 2 +- > 2 files changed, 13 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index a5fcad2430..aeb5ce17ab 100755 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -463,10 +463,13 @@ subtest "delete" => sub { > plan tests => 11; > t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); > t::lib::Mocks::mock_preference( 'ListOwnershipUponPatronDeletion', 'transfer' ); >- Koha::Virtualshelves->search({})->delete; >- my $userenv = C4::Context->userenv(); >+ Koha::Virtualshelves->delete; >+ >+ my $staff_patron = $builder->build_object({ class => 'Koha::Patrons' }); >+ t::lib::Mocks::mock_userenv({ patron => $staff_patron }); >+ > my $patron = $builder->build( { source => 'Borrower' } ); >- my $patron_for_sharing = (ref($userenv) eq 'HASH' ) ? $userenv->{'number'} : 0; >+ my $patron_for_sharing = $staff_patron->borrowernumber; > my $retrieved_patron = Koha::Patrons->find( $patron->{borrowernumber} ); > my $hold = $builder->build( > { source => 'Reserve', >@@ -477,19 +480,19 @@ subtest "delete" => sub { > my $private_list = Koha::Virtualshelf->new({ > shelfname => "private", > owner => $patron->{borrowernumber}, >- category => 1 >+ public => 0, > } > )->store; > my $public_list = Koha::Virtualshelf->new({ > shelfname => "public", > owner => $patron->{borrowernumber}, >- category => 2 >+ public => 1, > } > )->store; > my $list_to_share = Koha::Virtualshelf->new({ > shelfname => "shared", > owner => $patron->{borrowernumber}, >- category => 1 >+ public => 0, > } > )->store; > >@@ -520,19 +523,19 @@ subtest "delete" => sub { > my $private_list2 = Koha::Virtualshelf->new({ > shelfname => "private", > owner => $patron2->{borrowernumber}, >- category => 1 >+ public => 0, > } > )->store; > my $public_list2 = Koha::Virtualshelf->new({ > shelfname => "public", > owner => $patron2->{borrowernumber}, >- category => 2 >+ public => 1, > } > )->store; > my $list_to_share2 = Koha::Virtualshelf->new({ > shelfname => "shared", > owner => $patron2->{borrowernumber}, >- category => 1 >+ public => 0, > } > )->store; > >diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t >index 6c71456ad4..1de7ddc580 100755 >--- a/t/db_dependent/Virtualshelves.t >+++ b/t/db_dependent/Virtualshelves.t >@@ -480,7 +480,7 @@ subtest 'Get shelves' => sub { > my $shelf_to_share = Koha::Virtualshelf->new({ > shelfname => "shared shelf", > owner => $patron1->{borrowernumber}, >- category => 1, >+ public => 0, > } > )->store; > >-- >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 11889
:
25972
|
60224
|
60306
|
60307
|
60308
|
60481
|
61319
|
61320
|
61321
|
61322
|
61451
|
61452
|
61453
|
61454
|
108244
|
108245
|
108246
|
108247
|
135808
|
135809
|
135810
|
135811
|
135812
|
135813
|
135814
|
135815
|
135816
|
135817
|
135818
|
135819
|
135820
|
135821
|
135857
|
135858
|
135859
|
135860
|
135861
|
135862
|
135863
|
135864
|
135865
|
135866
|
135867
|
135868
|
135869
|
135870
|
135871
|
135872
|
135873
|
135874
|
135875
|
135876
|
135891
|
135892
|
135893
|
135894
|
135895
|
135896
|
135897
|
135898
|
135899
|
135900
|
135901