Koha/t/db_dependent
Fridolin Somers ebf2c9e98f Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t
In test suite db_dependent/Koha/Patrons.t actually shows :

    1..10
    ok 1 - Patron with no dateofbirth is always valid for any category
    ok 2 - Today=2020-02-28, dob=2015-03-01, is 5, should be valid=0
    ok 3 - Today=2020-02-28, dob=2015-02-27, is 5, should be valid=1
    ok 4 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
    ok 5 - Today=2020-02-28, dob=2015-02-28, is 7, should be valid=1
    ok 6 - Today=2020-02-28, dob=2009-02-27, is 11, should be valid=0
    ok 7 - Today=2020-02-28, dob=2016-08-27, is 3, should be valid=0
    ok 8 - Today=2020-02-28, dob=2009-03-01, is 11, should be valid=1
    ok 9 - Today=2020-02-28, dob=2007-08-27, is 12, should be valid=0
    ok 10 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1

Some ages are incorrect :

1) dob=2009-03-01, is 11
=> it is age 10
so valid=1 in category 5 to 10

2) dob=2015-03-01, is 5
=> it is age 4
so valid=0 in category 5 to 10

3) dob=2015-02-28, is 7
=> this date of birth is already tested
I suppose here dob is wrong, age wanted is 7 in the middle of age restrictions.
so dob=2013-02-28

This patch fixes ages.
Also adds the category code 'AGE_5_10' in messages to display age limits

Test plan :
Run prove -v t/db_dependent/Koha/Patrons.t without and with patch

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-08-20 13:48:31 -04:00
..
Acquisition Bug 27203: Adjust unit tests 2021-05-11 14:46:10 +02:00
api/v1 Bug 28632: Prevent api/v1/patrons.t to fail on dates comparison 2021-07-30 13:54:31 -04:00
Auth
AuthoritiesMarc Bug 21958: (QA follow-up) Correct indirect object notation 2021-04-01 17:13:56 +02:00
Authority
Biblio Bug 28384: Add 'no_items' option to TransformMarcToKoha 2021-07-16 09:32:12 -04:00
Circulation Bug 28520: Allow creating a transfer back automatically if a hold is canceled during transit 2021-06-18 10:46:41 -04:00
CourseReserves
Creators
cronjobs
data Bug 27968: Fix framework import if isurl has an incorrect value 2021-04-23 10:03:30 +02:00
Exporter
Holds Bug 27069: Adjust tests 2021-04-07 16:08:04 +02:00
Illrequest
Items Bug 4037: Add item type filter to inventory tool 2021-02-09 09:23:51 +01:00
Koha Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t 2021-08-20 13:48:31 -04:00
Labels
LDAP
Letters Bug 26734: (QA follow-up) Unit tests for C4::Letters 2021-04-27 16:23:49 +02:00
Members
misc/translator
OAI Bug 28741: Regression tests 2021-08-06 11:26:54 -04:00
Patron Bug 26937: Add an optional delay to the CheckPrevCheckout syspref. 2021-03-01 15:14:22 +01:00
Record
Reports Bug 27380: FIX Reports/Guided.t 2021-02-12 14:31:01 +01:00
Reserves Bug 26634: Remove GetHoldRule subroutine in C4::Reserves 2020-12-21 10:07:38 +01:00
Search
selenium Bug 28409: Adjust regression test 2021-06-24 12:15:00 -04:00
Serials
SIP Bug 27908: Add unit test 2021-07-16 08:55:23 -04:00
Template/Plugin Bug 24154: (follow-up) Make parameter and variable more explicit, add tests 2021-05-10 10:27:53 +02:00
Utils Bug 23271: Replace search_limited with search_with_library_limits 2021-04-21 15:25:07 +02:00
www
00-strict.t
01-test_dbic.t
Accounts.t Bug 27636: (QA follow-up) Unit tests for AutoReconcile 2021-04-30 17:07:31 +02:00
Acquisition.t Bug 23971: Rename pref with AcquisitionLog 2021-04-23 11:58:49 +02:00
Amazon.t
ArticleRequests.t
AudioAlerts.t
Auth.t Bug 21325: Add tests 2021-04-16 14:15:37 +02:00
Auth_with_cas.t Bug 20854: Add more CAS tests 2021-04-21 10:51:29 +02:00
Auth_with_ldap.t
AuthorisedValues.t Bug 23830: Make Koha::AuthorisedValues use Koha::Objects::Limit::Library 2021-02-08 17:09:34 +01:00
AuthoritiesMarc.t Bug 21958: Fix bibliographic record field comparison with authority 2021-04-01 17:13:56 +02:00
AuthUtils.t
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t
Biblio.t Bug 27577: Unit test 2021-05-06 15:52:38 +02:00
Breeding.t
Budgets.t Bug 23195: (follow-up) One text invoice should be open 2021-04-22 14:50:11 +02:00
Cache.t Bug 16067: Remove FastMmap 2020-12-04 15:40:58 +01:00
Calendar.t
Charset.t
check_kohastructure.t
check_sysprefs.t
Circulation.t Bug 24434: Unit tests for updateWrongTransfer 2021-06-18 10:37:17 -04:00
Clubs.t
Context.t
Contract.t
CourseReserves.t
db_structure.t
DecreaseLoanHighHolds.t
Filter_MARC_ViewPolicy.t
Fines.t
FrameworkPlugin.t
Heading.t Bug 21958: Allow 'e' subfield for authorities 2021-04-06 15:56:30 +02:00
Heading_MARC21.t
Hold.t Bug 26498: (QA follow-up) Add handling for update 2021-04-07 13:10:31 +02:00
Holds.t Bug 16787: 'Too many holds' message appears inappropriately and is missing data 2021-04-22 14:37:14 +02:00
HoldsQueue.t Bug 27069: Adjust tests 2021-04-07 16:08:04 +02:00
Holidays.t
Illcomments.t
Illrequestattributes.t
Illrequests.t
ILSDI_Services.t Bug 28630: Improve date comparisons in tests 2021-08-06 14:29:17 -04:00
ImportBatch.t Bug 24469: Move the new queries to a dedicated ImportBatch subroutine 2021-02-18 11:52:59 +01:00
ImportExportFramework.t Bug 27569: Add tests for ODS export 2021-02-16 10:22:13 +01:00
Installer.t Bug 28281: Add tests 2021-05-07 14:44:00 +02:00
Items.t Bug 27837: Check the MARC directly, not the transformed item 2021-05-19 15:06:42 +02:00
Koha.t
Koha_Authority.t
Koha_Database.t
Koha_Elasticsearch.t
Koha_ExternalContent_OverDrive.t
Koha_ExternalContent_RecordedBooks.t
Koha_Misc_Files.t
Languages.t
Letters.t Bug 28813: Update unit tests 2021-08-13 07:46:42 -04:00
LibraryGroups.t
Linker_Default.t
Linker_FirstMatch.t
Log.t
MarcModificationTemplates.t Bug 26894: Handle subfield 0 and delete empty fields 2021-01-12 16:02:35 +01:00
Members.t Bug 28001: (bug 27050 follow-up) Fix delete_patrons if no category passed 2021-04-16 12:28:17 +02:00
Message.t Bug 28230: Regression tests 2021-04-28 11:07:05 +02:00
MungeMarcPrice.t
NewsChannels.t
Overdues.t Bug 28144: Add a regression test 2021-04-27 16:23:49 +02:00
Passwordrecovery.t
Patroncards.t
PatronLists.t
Patrons.t Bug 27554: Clarify and add tests for update_category_to 2021-02-01 16:21:25 +01:00
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reserves.t Bug 28644: Fix calling borrowernumber on undefined value 2021-07-16 08:22:59 -04:00
rollingloans.t
RotatingCollections.t Bug 17202: Unit tests 2021-04-28 11:07:06 +02:00
Search.t Bug 27928: FindDuplicate should use simple_search_compat 2021-04-01 18:03:23 +02:00
Serials.t Bug 27842: Add tests 2021-04-28 11:07:06 +02:00
Serials_2.t
Service.t
ShelfBrowser.t
Sitemapper.t
Stats.t
StockRotationItems.t Bug 22569: Add Unit Tests 2021-03-11 11:51:40 +01:00
StockRotationRotas.t
StockRotationStages.t
SuggestionEngine_ExplodedTerms.t
Suggestions.t
sysprefs.t
TablesSettings.t
Tags.t
Templates.t
TestBuilder.t Bug 28479: Use primary keys to check object existence in TestBuilder 2021-07-02 08:54:39 -04:00
Upload.t Bug 28123: Fix expected value in unit test 2021-04-16 12:28:18 +02:00
UsageStats.t Bug 28108: Fix filtering 2021-05-10 15:52:53 +02:00
Virtualshelves.t
XISBN.t Bug 28288: Prevent XSISBN.t to fail if service is returning 500 2021-05-04 16:38:27 +02:00
XSLT.t Bug 28299: Unit tests for buildKohaItemsNamespace 2021-07-09 13:48:57 -04:00
yaml.t Bug 22824: Adjust tests to match final behaviours 2021-03-04 16:18:42 +01:00
zebra_config.pl