Bugzilla – Attachment 149753 Details for
Bug 33229
Patron reading history should be cleared when privacy set to never
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2
Bug-33229-follow-up-Adjust-tests-to-set-anonymous-.patch (text/plain), 2.59 KB, created by
Nick Clemens
on 2023-04-17 12:52:49 UTC
(
hide
)
Description:
Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2023-04-17 12:52:49 UTC
Size:
2.59 KB
patch
obsolete
>From f8887e352b7f8ecd72071d2b975fadb7362a4cdc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 17 Apr 2023 12:52:34 +0000 >Subject: [PATCH] Bug 33229: (follow-up) Adjust tests to set anonymous patron > before setting patron privacy to 2 > >--- > t/db_dependent/Koha/Hold.t | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Hold.t b/t/db_dependent/Koha/Hold.t >index 7146541522..ffb0fa0053 100755 >--- a/t/db_dependent/Koha/Hold.t >+++ b/t/db_dependent/Koha/Hold.t >@@ -229,8 +229,13 @@ subtest 'fill() tests' => sub { > is( Koha::Old::Holds->find( $hold->id )->borrowernumber, > $patron->borrowernumber, 'Patron link is kept' ); > >- # 2 == delete immediately >+ my $anonymous_patron = $builder->build_object({ class => 'Koha::Patrons' }); >+ t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous_patron->id ); >+ # We need anonymous patron set to change patron privacy to never >+ # (2 == delete immediately) >+ # then we can undef for further tests > $patron->privacy(2)->store; >+ t::lib::Mocks::mock_preference( 'AnonymousPatron', undef ); > $hold = $builder->build_object( > { > class => 'Koha::Holds', >@@ -247,7 +252,6 @@ subtest 'fill() tests' => sub { > > ok( !$hold->is_found, 'Hold is not filled' ); > >- my $anonymous_patron = $builder->build_object({ class => 'Koha::Patrons' }); > t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous_patron->id ); > > $hold = $builder->build_object( >@@ -563,8 +567,13 @@ subtest 'cancel() tests' => sub { > is( Koha::Old::Holds->find( $hold->id )->borrowernumber, > $patron->borrowernumber, 'Patron link is kept' ); > >- # 2 == delete immediately >+ my $anonymous_patron = $builder->build_object({ class => 'Koha::Patrons' }); >+ t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous_patron->id ); >+ # We need anonymous patron set to change patron privacy to never >+ # (2 == delete immediately) >+ # then we can undef for further tests > $patron->privacy(2)->store; >+ t::lib::Mocks::mock_preference( 'AnonymousPatron', undef ); > $hold = $builder->build_object( > { > class => 'Koha::Holds', >@@ -580,7 +589,6 @@ subtest 'cancel() tests' => sub { > > ok( !$hold->is_found, 'Hold is not cancelled' ); > >- my $anonymous_patron = $builder->build_object({ class => 'Koha::Patrons' }); > t::lib::Mocks::mock_preference( 'AnonymousPatron', $anonymous_patron->id ); > > $hold = $builder->build_object( >-- >2.30.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 33229
:
148186
|
148197
|
148546
|
148547
| 149753