Bugzilla – Attachment 87396 Details for
Bug 21336
GDPR: Handle unsubscribe requests automatically by optional (administrative) lock, anonymize and remove
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21336: (QA follow-up) Add tests for administrative lockout
Bug-21336-QA-follow-up-Add-tests-for-administrativ.patch (text/plain), 1.98 KB, created by
Martin Renvoize (ashimema)
on 2019-04-04 08:46:48 UTC
(
hide
)
Description:
Bug 21336: (QA follow-up) Add tests for administrative lockout
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-04-04 08:46:48 UTC
Size:
1.98 KB
patch
obsolete
>From 990b4d24c854371f30a273c0254282e92518ec58 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 4 Apr 2019 09:42:38 +0100 >Subject: [PATCH] Bug 21336: (QA follow-up) Add tests for administrative > lockout > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/Patrons.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 6acff6c2c0..8175a25b48 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1121,7 +1121,7 @@ subtest 'libraries_where_can_see_patrons + can_see_patron_infos + search_limited > }; > > subtest 'account_locked' => sub { >- plan tests => 9; >+ plan tests => 13; > my $patron = $builder->build({ source => 'Borrower', value => { login_attempts => 0 } }); > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > for my $value ( undef, '', 0 ) { >@@ -1129,6 +1129,8 @@ subtest 'account_locked' => sub { > is( $patron->account_locked, 0, 'Feature is disabled, patron account should not be considered locked' ); > $patron->login_attempts(1)->store; > is( $patron->account_locked, 0, 'Feature is disabled, patron account should not be considered locked' ); >+ $patron->login_attempts(-1)->store; >+ is( $patron->account_locked, 1, 'Feature is disabled but administrative lockout has been triggered' ); > } > > t::lib::Mocks::mock_preference('FailedloginAttempts', 3); >@@ -1138,6 +1140,8 @@ subtest 'account_locked' => sub { > is( $patron->account_locked, 1, 'Patron has 3 failed attempts, account should be considered locked yet' ); > $patron->login_attempts(4)->store; > is( $patron->account_locked, 1, 'Patron could not have 4 failed attempts, but account should still be considered locked' ); >+ $patron->login_attempts(-1)->store; >+ is( $patron->account_locked, 1, 'Administrative lockout triggered' ); > > $patron->delete; > }; >-- >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 21336
:
79165
|
79166
|
79167
|
79168
|
79169
|
79170
|
80201
|
80202
|
80203
|
80204
|
80205
|
80206
|
80207
|
80208
|
80213
|
80214
|
80386
|
80387
|
80403
|
81112
|
81113
|
81114
|
81115
|
81116
|
81117
|
81118
|
81119
|
81270
|
81474
|
81475
|
81476
|
81477
|
81478
|
81479
|
81480
|
81481
|
81482
|
81483
|
82051
|
82052
|
82053
|
82054
|
82055
|
82056
|
82057
|
82058
|
82059
|
83202
|
83203
|
83204
|
83205
|
83206
|
83207
|
83208
|
83209
|
83256
|
87158
|
87159
|
87160
|
87161
|
87162
|
87163
|
87164
|
87165
|
87166
|
87167
|
87168
|
87176
|
87177
|
87178
|
87179
|
87180
|
87181
|
87182
|
87183
|
87184
|
87185
|
87387
|
87388
|
87389
|
87390
|
87391
|
87392
|
87393
|
87394
|
87395
|
87396
|
87397
|
87400
|
87401
|
88198
|
88199
|
88217
|
88218