Bugzilla – Attachment 107587 Details for
Bug 20804
Sanitize input of timeout syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20804: Add tests
Bug-20804-Add-tests.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2020-07-30 13:20:15 UTC
(
hide
)
Description:
Bug 20804: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-07-30 13:20:15 UTC
Size:
1.48 KB
patch
obsolete
>From c17edff0c519c6300d1ca779878d79d37484a0ff Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Jul 2020 15:15:36 +0200 >Subject: [PATCH] Bug 20804: Add tests > >--- > t/db_dependent/Auth.t | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t >index e149aec867..b836aa1cd0 100644 >--- a/t/db_dependent/Auth.t >+++ b/t/db_dependent/Auth.t >@@ -10,7 +10,7 @@ use CGI qw ( -utf8 ); > use Test::MockObject; > use Test::MockModule; > use List::MoreUtils qw/all any none/; >-use Test::More tests => 22; >+use Test::More tests => 23; > use Test::Warn; > use t::lib::Mocks; > use t::lib::TestBuilder; >@@ -391,4 +391,23 @@ subtest 'Check value of login_attempts in checkpw' => sub { > is( $patron->account_locked, 1, 'Check administrative lockout without pref' ); > }; > >+subtest '_timeout_syspref' => sub { >+ plan tests => 5; >+ >+ t::lib::Mocks::mock_preference('timeout', "100"); >+ is( C4::Auth::_timeout_syspref, 100, ); >+ >+ t::lib::Mocks::mock_preference('timeout', "2d"); >+ is( C4::Auth::_timeout_syspref, 2*86400, ); >+ >+ t::lib::Mocks::mock_preference('timeout', "2D"); >+ is( C4::Auth::_timeout_syspref, 2*86400, ); >+ >+ t::lib::Mocks::mock_preference('timeout', "10h"); >+ is( C4::Auth::_timeout_syspref, 10*3600, ); >+ >+ t::lib::Mocks::mock_preference('timeout', "10x"); >+ is( C4::Auth::_timeout_syspref, 600, ); >+}; >+ > $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 20804
:
107587
|
107588
|
109688
|
111160
|
111161
|
111547
|
111548