Bug 18356: Extend GetNextDate.t, add GetFictiveIssueNumber.t (unit=year)
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 11 May 2017 08:47:22 +0000 (10:47 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Jun 2017 18:35:45 +0000 (15:35 -0300)
commit285f6bd945373c06633b2c42621d754d93c37903
treeb44825e8e346dba3c4f45d48cebc73f4b7176576
parentda10c3169b8cae71bf4a98b6585654a09704c323
Bug 18356: Extend GetNextDate.t, add GetFictiveIssueNumber.t (unit=year)

This patch deals with tests for yearly frequencies.

Adjust/extend GetNextDate.t:
[1] Adjust mixup of units/issues in a description.
[2] Add testing +2 years on 29-2 of leap year for freq 1 issue/2 years.
[3] Add tests for freq 9 issues/year.

Add GetFictiveIssueNumber.t:
[1] Two subtests are provided for irregular frequencies (very trivial) and
    for year frequencies (with four specific test cases).

Test plan:
[1] Run t/db_dependent/Serials/GetNextDate.t
[2] Run t/db_dependent/Serials/GetFictiveIssueNumber.t

Note: Without the second patch both tests should fail. This shows the need
of the adjustments in the second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Serials/GetFictiveIssueNumber.t [new file with mode: 0644]
t/db_dependent/Serials/GetNextDate.t