This test file adds tests for the TR_B2 specific report.
But also tests for this specific bug, which only happens if
the report time period ends in december
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Remove use of exported_records file in favor of TestBuilder.
Remove conditional tests with SKIP block. Create reservoir record.
Test plan:
Run t/db_dependent/Koha_Authority.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Run:
prove -v t/db_dependent/ImportExportFramework.t and confirm all tests
pass.
I've also added a fix to remove the warns when exporting in ODS format.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
If isurl is set to undef in the DB, it will be exported as an empty
string, which is an invalid value for isurl (int)
Incorrect integer value: '' for column 'isurl'
Test plan:
Export framework structure in CSV and ODS, then reimport it and check that
all the subfields are important correctly
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Finally we diverge quite a lot with how it worked prior to this patch
set. Reflect the changes in the tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Writing some tests to see how things are working currently
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Switch from "#" to ""
Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Looks ok so far
Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This uses the work from bug 18098 to use the count of not-onloan items to
determine availability.
It keeps the allrecords,AlwaysMatches='' portion of the query so it still catches
records with the tested indexed missing.
These shouldn't exist except in the case of missing data, but kept for future use as well as
it has no negative impact and minimizes the change made.
Note that availability in this sense means not check out and not lost. Transfers, holds, and not for loan statuses
should probably have indexes built in the same way as bug 18098 (there are related FIXMEs in the code)
This updates the export_records file used for testing - adding three records with a not-onloan-count (999$x) of 1,
but marking the item on the third record lost to prevent its return
To test:
1 - make sure SearchEngine pref is set to 'Zebra'
2 - Do a search on the OPAC that returns some records
3 - Find a record in those results with more than one 1 item, and checkout 1 leaving 1 (or more) available
4 - Find another record with only 1 item, check that item out
5 - Limit opac search to available items - both records disappear
6 - Apply patch
7 - Restart all the things
8 - Repeat search
9 - First record should show, but no second
10 - Mark other items of first record as lost, return items on second record
11 - Repeat search, first record should not be in results, second should
12 - prove -v t/db_dependent/Search.t
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds tests for:
- Output of ImportFramework on fields removal and error conditions (file
not found)
- Different file format behaviour (csv, xml and ods are tested).
To test:
- Run
$ kshell
k$ prove t/db_dependent/ImportExportFramework.t
=> SUCCESS: All green :-D
- Sign off :-D
Note: the biblio_framework* files are based on the original one on the
patchset, and exported in 17.11 with different formats.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Apply this patch only
2 - prove -v t/db_dependent/Search.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/Search.t
6 - It passes!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Changes to searchResults deserve unit tests.
Edit: minor tweaks:
- Remove warning in line 702
- Modernize
- License added
- "This file is a stub" removed
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This adds direct tests of indexing and retrieving
bib records that are larger than the ISO2709 limit
of 99,999 octets.
To test: verify that prove -v t/db_dependent/Search.t passes.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a regression test for Koha's ability
to gracefully handle records that Zebra will index but
which MARC::Record won't parse. In particular, MARC::File::USMARC
croaks on records that contain non-alphanumeric characters in the
tag name.
To test:
[1] After applying this test, run prove -v t/db_dependent/Search.t
The test script will die when it gets to the regression test.
[2] After applying the main patches that fix the bug, the test
script should pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch enhances t/db_dependent/Search.t to test indexing and
searching of authority records. It supplies a sample authority file
for MARC21 (consisting of the record for William Shakespeare from the
Library of Congress) and a sample UNIMARC authority file supplied
by Henri-Damien Laurent.
It also adds tests for both MARC21 and UNIMARC authorities.
When the main patch for bug 7421 is applied, t/db_dependent/Search.t
should pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a few basic search and indexing tests for UNIMARC,
using sample data provied by Frédéric Demians. The new tests
by no means completely cover the possibilities, but should be
considered a starting point for future tests.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch refactors t/db_dependent/Search.t so that it can be
subsequently modified to add tests for indexing and searching
UNIMARC records without duplicating the setup code.
This patch also moves the MARC21 records from t/db_dependent/data/zebraexport
to t/db_dependent/data/marc21/zebraexport so that UNIMARC sample
data can be slotted in t/db_dependent/data/unimarc/zebraexport.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The Zebra test uses Unix-domain sockets, which won't work if
Koha is being installed or tested from an NFS- or SSHFS-mounted
clone. Therefore, create (and clenaup) a temporary directory on
(hopefully) a normal filesytem to run the test.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds a unit test for C4::Search in t/db_dependent. In order
to test the functioning of the Zebra search, this patch actually includes
an entire Zebra sandbox, and pre-indexed files, which are stored in
t/db_dependent/data (the configuration files are generated on the fly).
This test depends on Test::Warn, Test::MockModule, and DBD::Mock.
To test:
1) Run the test. There should be no failures, and no warnings.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>