Commit graph

2840 commits

Author SHA1 Message Date
d3503e8119 Bug 20422: Add unit test to Output.t for parametrized_url
This test will reveal that we need to resolve a warning too.

Test plan:
[1] Run t/Output.t without the second patch.
[2] The test will fail on the warning raised by an undefined value.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-26 17:31:13 -03:00
Mark Tompsett
0d553fa721 Bug 18570: Follow up to fix test noise
This sets a valid email and changes the tests
to expect it was sent.

prove t/db_dependent/Passwordrecovery.t
-- noise before patch
-- no noise after patch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-26 11:47:27 -03:00
13ae64db80 Bug 19943: Fix Borrower_PrevCheckout.t - create the biblioitem entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:15 -03:00
ac21d687a1 Bug 19943: Fix SwitchOnSiteCheckouts.t - create the biblioitem entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:15 -03:00
07dedc7dbb Bug 19943: Fix dateexpiry.t - create the biblioitem entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:15 -03:00
7a90a0ca1c Bug 19943: Fix NoIssuesChargeGuarantees.t - create the biblioitem entry
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:15 -03:00
f394973124 Bug 4078: Fix test when fr_FR.UTF-8 is installed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:15 -03:00
fe85f7f674 Bug 20466: Fix fixture syntax in t/Prices.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 13:24:14 -03:00
6183c0e6a9 Bug 19943: Koha::Biblio - Replace GetBiblioItemData with Koha::Biblio->biblioitem
The biblioitem's info can be retrieved with Koha::Biblio->biblioitem

Test plan:
1. Use the age restriction to restrict checkouts for a given patron
2. Check some items of a biblio out, go to "Items" tab, then "View
item's checkout history" link. Compare views with and without patches

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 12:31:58 -03:00
6ee8f826f7 Bug 19929: Add Koha objects for class sources and sorters
prove -v t/db_dependent/Koha/ClassSortRules.t
prove -v t/db_dependent/Koha/ClassSources.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
Kyle M Hall
e77982ade1 Bug 18626: Add unit tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
dbc24783ee Bug 17826: Allow extended patron attributes to be sent in arbitrary SIP2 fields
Some libraries need to be able to send additional patron data from the
extended patron attributes in made up SIP2 fields for the patron
information and patron status responses.

Test Plan:
1) Apply this patch
2) Create 3 new patron attributes with the codes CODE1, CODE2, CODE3.
   Make a least one repeatable.
3) Create a patron, add those attibutes for the patron, make sure there
   are at least two instances of the repeatable code
4) Edit your SIP2 config file, add the following within the login stanza:
   <patron_attribute field="XX" code="CODE1" />
   <patron_attribute field="XY" code="CODE2" />
   <patron_attribute field="XZ" code="CODE3" />
5) Using the sip cli emulator, run patron_information and
   patron_status_request messages for the patron
6) Note the values you set for the patron attributes are sent in the
   corrosponding fields!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Mauchley <dmauchley@duchesne.utah.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: added parentheses on line 488 when assigning hashref to array.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
bd29269185 Bug 20264: Remove syspref checkdigit
According to
http://irc.koha-community.org/koha/2013-06-26#i_1333289
http://irc.koha-community.org/koha/2013-06-26#i_1333589
and Hea data, this syspref is no longer in used and is always set to
false.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
f2cf899a90 Bug 4078: Add a new test
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
18e72e3195 Bug 4078: Add the ability to display and configure the symbol for prices
The symbol of currencies are not displayed (or not correctly) so far.
This patch set adds the ability to configure the display of the symbol
(with or without a whitespace between the symbol and the price).

Test plan:
1. Execute the update DB entry, go to the currency admin page and tick the
new "Space separation between symbol and value" checkbox
2. Add a fine to a patron and use their credentials to login at the OPAC
3. You should see the "$ 42 due fines and charges" info in the
dashboard
4. Untick the new checkbox to remove the space and reload the OPAC main
page.
=> The space should not be longer displayed ($42)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
David Bourgault
736f8a9205 Bug 17457: Add tests for each marc flavour
+ Added a `run_flavoured_tests` sub that runs for each MARC flavour
* Moved SearchWithISBNVariation tests to the new sub

I copied a lot of the necessary utility functions over Biblio.t (as of Jonathan's suggestion). I also tried to name and organize the code in such a way that it can be reused if anyone else needs to run "flavoured" tests in the future.

prove t/db_dependant/Acquisition.t  OK
QA tool green

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
David Bourgault
f1c14d25d1 Bug 17457: Adv. Acquisition search with ISBN variations
Advanced acquisition search will now follow the "SearchWithISBNVariations" system preference.

Test plan :
0) Make sure you have orders pending or completed
1) Enable SearchWithISBNVariations if it is not enabled
2) Search for one of your orders by its ISBN, it should appear
3) Search for the same order by a variation of its ISBN, I used this website to find it : http://www.hahnlibrary.net/libraries/isbncalc.html
You should not get a result.
4) Apply patch
5) Repeat step 2-3. You should get a hit both times.
6) prove t/db_dependent/Acquisition.t

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-23 11:45:38 -03:00
6d1525dbf1 Bug 20321: Remove get_biblionumber_from_isbn
To test:
1 - grep get_biblionumber_from_isbn
2 - verify all occurences are not actual calls (except for test)
3 - Apply patch
4 - grep get_biblionumber_from_isbn
5 - Verify it is removed

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-19 13:55:47 -03:00
84bd0a17cc Bug 20219: Remove t/smolder_smoke_signal
The file is no longer used (is it?) and the project looks dead. Let
remove that file.

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-19 13:55:47 -03:00
Mark Tompsett
f0772f0c55 Bug 18570: Prove that the letter code parameter tweaks work
Run the following commands:
kshell
prove -v t/db_dependent/Letters.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-19 13:55:37 -03:00
Mark Tompsett
73c21c4d30 Bug 18570: Tests to prove if email send was attempted
kshell
prove -v t/db_dependent/Passwordrecovery.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-19 13:55:37 -03:00
Mark Tompsett
aea565e71e Bug 20097: (follow-up) Add a unit test
kshell
prove -v t/db_dependent/Record.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-19 13:54:50 -03:00
00374d0741 Bug 20167: Regression test
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-03-15 08:24:00 +00:00
2201fda6c7 Bug 20311: Prevent get_age tests to fail on Feb 28th
Today Feb 28th 2018:
If we subtract 18y to this DateTime object 29/02/2000 and so the patron is not major yet

use Koha::DateUtils qw( dt_from_string );
say dt_from_string('28/02/2018')->add(years => -18);
say dt_from_string('28/02/2018')->add(years => -18, end_of_month => 'limit');

will display:
2000-02-29T00:00:00
2000-02-28T00:00:00

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-28 14:02:50 -03:00
ae9a246840 Bug 19979: ->count and be called directly on Koha::Objects
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-27 11:41:21 -03:00
670712e57c Bug 19979: Fix get_facets_info test in Search.t
The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.

Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
    would fail: Failed test '_get_facets_info returns the correct data'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-27 11:41:21 -03:00
d88c0803e6 Bug 13287: (QA follow-up) Extend Suggestions.t for DelSuggestionsOlderThan
Adding a days>0 test in the sub with a POD line.
Specific subtest for this sub added in Suggestions.t.

Test plan:
Run t/db_dependent/Suggestions.t again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-26 13:24:45 -03:00
b241555b0a Bug 13287: (QA follow-up) Prepare Suggestions.t for changes
Just rearranging some modules here.
Adding Koha::Database and schema calls.

Test plan:
Run t/db_dependent/Suggestions.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-26 13:24:45 -03:00
912824a9b1 Bug 20199: Add tests for Koha::Acq::Order->store
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-26 13:24:43 -03:00
0e83779f2f Bug 12001: (QA follow-up) Add test for Koha::Account::Lines object
Test plan
prove t/db_dependent/Koha/Account/Lines.t
--> should be green

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00
4e479921bf Bug 12001: Prove that result are the same \o/
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00
6355791848 Bug 12001: Move GetMemberAccountBalance to Koha::Account->non_issues_charges
As said previously, GetMemberAccountBalance returns ( the balance, the
non issues charges, the other charges)

The other charges are the balance - the non issues charges.

In this patch we remove the subroutine from C4::Members and use the
new Koha::Account->non_issues_charges subroutine instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00
d9558f7786 Bug 12001: Add tests
Yes, we need tests to make sure we understand what is going on in this
subroutine.
The different combination of HoldsInNoissuesCharge,
RentalsInNoissuesCharge and ManInvInNoissuesCharge are tested here with
the subroutine we are going to remove (GetMemberAccountBalance).
In one of the next patches the new methods will be used to make sure we
are not modifying the calculated values (except the formatting).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00
51aa6db46c Bug 12001: Move GetMemberAccountRecords to the Koha namespace
The GetMemberAccountRecords may be a perf killer, it retrieves all the
account lines of a patron and then the related item and biblio
information.
Most of the time we only want to know how much the patron owns to the
library (sum of amountoutstanding). We already have this information in
Koha::Patron->account->balance.

This patch replaces the occurrences of this subroutine by fetching only
the information we need, either the balance, the detail, or both.
It removes the formatting done in the module, to use the TT plugin
'Price' instead.
There is a very weird and error-prone behavior/feature in
GetMemberAccountBalance (FIXME): as the accountlines.accounttype is a
varchar(5), the value of the authorised value used for the
ManInvInNoissuesCharge pref (category MANUAL_INV) is truncated to the 5
first characters. That could lead to unexpected behaviors.

On the way, this patchset also replace the GetMemberAccountBalance
subroutine, which returns the balance, the non issues charges and the
other charges. We only need to have the balance and the non issues
charges to calcul the third one.

Test plan:
Add several fees for a patron and play with HoldsInNoissuesCharge,
RentalsInNoissuesCharge and ManInvInNoissuesCharge.
The information (biblio and item info, as well as the account line) must
be correctly displayed on the different screens: 'Fines' module, fine
slips, circulation module

Note that this patchset could introduce regression on price formatting,
but will be easy to fix using the TT plugin.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-23 10:57:30 -03:00
673a40d2ac Bug 20250: (bug 19529 follow-up) Prevent NoIssuesChargeGuarantees.t to fail randomly
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-19 17:40:06 -03:00
charles
30f6f17664 Bug 17672: Fixing Items.t expected tests from 12 to 13
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-18 16:48:43 -03:00
5d8155439e Bug 17672: Add damaged_on to items and deleteditems tables
This patchset adds a 'damaged_on' column to store the date an item is
marked damaged, analogous to withdrawn_on and itemlost_on

To test:
1 - Apply patch
2 - Mark an item damaged via moredetail.pl (Items tab on left in
        details)
3 - Note the damaged on date apears below
4 - Unmark the item, the date is removed
5 - Go to the edit items screen (from top bar 'Edit->edit items')
6 - Mark item damaged - check db or moredetails.pl to see damaged_on
date
7 - Unmark item damaged - confirm date is removed
8 - prove t/db_dependent/Items.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-18 16:48:43 -03:00
744e9a0379 Bug 20145: Do not insert 0000-00-00 in patron tests (and more)
We should call Koha::Patron->is_expired in CanBookBeIssued instead of
doing the same calculation.

Tests have been adapted to pass with new SQL modes.

We should not need to update the values in DB, we already have
  Bug 14717: Prevent 0000-00-00 dates in patron data (3.21.00.023)

Test plan:
  prove t/db_dependent/Circulation/dateexpiry.t
  prove t/db_dependent/Koha/Patrons.t
must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-18 14:48:05 -03:00
d74c5393ed Bug 18336: Full stack tests for supplemental UTF-8 chars
This patch introduces tests for Koha's support for 4-byte supplemental
UTF-8 chars. encoding/decoding tools handle this gracefuly. The missing
piece is the MySQL DB backend.

The tests in this patch:
- Adds a couple records for each flavour (MARC21 and UNIMARC) so
  search_utf8.t tests 4-byte chars are handled correctly
- Adds emoji testing in auth_values_input_www.t

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/www/search_utf8.t \
          t/db_dependent/www/auth_values_input_www.t
=> FAIL: It should fail if the DB hasn't been migrated into using
utf8mb4

Sponsored-by: Hotchkiss School

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:42 -03:00
3afbbdf48c Bug 20004: Unit tests
This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 17:53:41 -03:00
ae7f0ae4b5 Bug 19686: (follow-up) Add to_api param for completeness
This patch adds (yet) another param to objects.search: a reference
to a to_api function to be applied when processing the search results
for output.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Test count raised, and tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:20 -03:00
37ed1111ce Bug 19686: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:19 -03:00
bd122369dc Bug 12598: Remove warnings from tests and make them pass
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 14:05:18 -03:00
e1476578f2 Bug 12598: Update code to use new modules
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:58 -03:00
c2066bcadc Bug 12598: New misc/import_borrowers.pl command line tool
Test Plan:
1) Apply this patch
2) Test importing patrons from command line,
   options are availble with --help.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Tested with minimal csv
(cardnumber,surname,firstname,categorycode,branchcode,password,userid)

Overwrite does not change category or branch.
Patrons are loaded, userid & password works

Updated license to GPLv3
No other koha-qa errors.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Tidy import_borrowers.pl

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Move importing code to a subroutine

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Update command line script to use patron import subroutine

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 [QA Followup]

* Fix copyright on import_borrowers.pl
* Changes -c --csv to -f --file
* Adds -c --confirm option
* Renames misc/import_borrowers.pl to misc/import_patrons.pl
* Restore userid matchpoint option

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Fix merge to master. Backport 3 updates from latest import_borrowers.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Started regression tests. Fix missing C4::Members::Attributes package

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - More refactoring and regression tests in Koha::Patrons::Import

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Creating objects in misc/import_patrons.pl and tools/import_borrowers.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Refactoring Koha::Patrons::Import includes bug fixed for critical date types and header column parsing

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598 - Rebase + backport of 16426 plus fixing 16426

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 12598: catch warnings raised by import_patrons in tests

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:57:57 -03:00
c49bffda19 Bug 18789: Add tests for is_adult and is_child
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:58 -03:00
e5f70a6010 Bug 18789: Add tests for is_adult and is_child
This patch add 2 methods to the Koha::Patron module: is_adult and
is_child.
That way the business logic is at only one place and covered by tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:58 -03:00
524eab6788 Bug 20176: [sql_modes] Set biblio.datecreated to NOW if not defined
Fix at ->store level, this issue appears in lot of places.

Fix for:
Field 'datecreated' doesn't have a default value

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:58 -03:00
04005f2ea1 Bug 20191: Use find with unique key combination
To prevent unexpected issues later.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:01:03 -03:00
2f90cd2be0 Bug 20191: Make OAI/Server.t tests use timestamps from the DB
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:01:03 -03:00