Commit Graph

3125 Commits

Author SHA1 Message Date
Martin Renvoize 34bfc86402 Bug 21692: (QA follow-up) Enhance test for new
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 569c64252e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6643dc2a94)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-06 16:57:20 +00:00
Jasmine Amohia cc3fb766da Bug 21692: created a test for Koha::Account->new
Test plan:
1) Run test for /Koha/Account.t and confirm that all tests were
successful

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 34c36a32a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0b51ad0f4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-06 16:56:19 +00:00
Kyle M Hall ca706e6310 Bug 21997: Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d0a6469ad5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a72d11e55d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-06 16:13:48 +00:00
Jonathan Druart e581b73c5d Bug 22386: Remove debug statements
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 25006c04da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 111ddbfa57)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-06 07:45:17 +00:00
Nick Clemens fdf5e5fa9a Bug 22386: Unit tests
Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f27a63b9a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6ca920313)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-06 07:44:25 +00:00
Katrin Fischer a62ab43562 Bug 10676: Add unit tests - GetItemsInfo
To test:
  prove t/db_dependent/Items.t

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e139a237b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97f41c827f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-05 15:57:05 +00:00
Alex Arnaud 9fd399263a Bug 13515: Add unit tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11b9bb3da9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5061a7319)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-25 22:37:29 +00:00
Kyle M Hall 81ae463c1e Bug 21829: (QA follow-up) - Update the number of unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3f5b98fd9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60b1a4f836)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:35:11 +00:00
Jonathan Druart f7bcb149d5 Bug 21829: Add tests for dateexpiry format in notices
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04e121a741)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1106c0fa59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:34:24 +00:00
Martin Renvoize 60f8ca789f Bug 22254: Correction to datehandling in test
Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 05:47:07 +00:00
Tomas Cohen Arazi 12f0e63b3a Bug 19816: Regression tests
This patch adds tests for the rfc3339 behaviour when dateonly => 1.

To test:
- Run:
  $ kshell
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: dateonly is not implemented

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e69ab62a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41115fc79d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 02:40:54 +00:00
Lucas Gass 626955bbfd Bug 22132: Unit tests - Revert
This reverts commit 2b12b70de4.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:39:19 +00:00
Lucas Gass a59f0f707d Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert
This reverts commit 7296f1d0bf.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:37:34 +00:00
Lucas Gass b3b82d15b6 Bug 22132: (QA follow-up) set_password now expects a hashref - Revert
This reverts commit c028f91674.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:36:46 +00:00
Tomas Cohen Arazi c028f91674 Bug 22132: (QA follow-up) set_password now expects a hashref
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63f40e519c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3c8f67afe8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:17:28 +00:00
Martin Renvoize 7296f1d0bf Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth
Mojolicious has built in handling for encoding/decoding of of basic auth
paramenters. We should use it to simplify our test here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ee08c3922)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9b3b01dd9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:17:03 +00:00
Tomas Cohen Arazi 2b12b70de4 Bug 22132: Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 103670e726)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4730724c66)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:16:20 +00:00
Lucas Gass d1fb153aab Bug 21478: (RMaint follow-up) fixed test count
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-06 16:27:35 +00:00
Tomas Cohen Arazi 7c89f03580 Bug 21478: (QA follow-up) Make sure tests don't fail randomly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e33f125384)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17231a2c35)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-05 23:19:34 +00:00
Tomas Cohen Arazi a4bca9e77c Bug 21478: Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 92db2e74fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f087b9895e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-05 23:18:45 +00:00
Tomas Cohen Arazi 25f979cc5a Bug 21478: Add Koha::Exceptions::Hold
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11ce911915)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ddbfc92aa6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-05 23:18:18 +00:00
Jonathan Druart 9b29c0ed84 Bug 22006: Add tests
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 58f04600f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4d3510f89c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-01-23 23:11:30 +00:00
Tomas Cohen Arazi 7dda73dd26 Bug 22107: patrons.t doesn't need to delete existing data
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21676d7b87)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb455d9b8d)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:06:14 +00:00
Tomas Cohen Arazi 73147064bb Bug 22107: Make tests use a simpler class, with no FK
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 528e09cf15)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a59826288b)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 18:05:58 +00:00
Tomas Cohen Arazi 91fbe63d18 Bug 21912: (QA follow-up) Do not delete existing patrons
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8e6c789255)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9b6b80488a)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 17:45:58 +00:00
Tomas Cohen Arazi dc096dafe6 Bug 21912: Add tests for Koha::Objects->search
This patch adds simple tests for the current behaviour. Specifically the
return values in both scalar and list context.

To test:
- Apply this patch
- Run:
  $ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7669697732)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 464dcd7d9e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-23 17:45:39 +00:00
Tomas Cohen Arazi be5c32a5b5 Bug 22071: Regression tests
The authenticate_api_request() behaviour needs more tests. This patch
adds tests for the stashed Koha::Patron object. It highlights the bug in
the OAuth authentication case.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail in the OAuth case, pass in the cookie-based auth
case.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2067b8e3f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d830a2f097)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:32:17 +00:00
Nick Clemens 054819fb8e Bug 22052: Unit tests
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44e37b201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2bc4f25855)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-01-11 19:11:03 +00:00
Marcel de Rooy f8bebfc09a Bug 21848: Resolve unac_string warning from Circulation.t
Just add "use utf8".

Test plan:
Run Circulation.t; verify there are no warnings.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e731ce094)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dbb5e6360)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-28 06:36:54 +00:00
Jonathan Druart a630acd720 Bug 21065: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 09ef91653b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 554cee5b3c)

Conflicts:
	t/db_dependent/Koha/Account/Lines.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-27 21:19:49 +00:00
Jonathan Druart 61784f5e26 Bug 14334: Remove AutoCommit from tests
And use a DBIx transaction instead.

Test plan:
prove that the test files modified by this patch are passing

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64242cabea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 10148dc26b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 22:03:55 +00:00
Nick Clemens 4262486ef3 Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron
To test:
 1 - Export your patrons
    a - Create a report 'SELECT * FROM borrowers'
    b - Run and save the report as csv (check your delimiter)
    c - Delete the borrowernumebr column
 2 - Use the Patron Import tool to import the csv from above
 3 - Set matching to 'cardnumber'
 4 - Set 'If matching record is already in the borrowers table:' to
Overwrite
 5 - Import
 6 - None are import because of matchign userid (their own)
 7 - Apply patch
 8 - Repeat
 9 - Patrons are successfully overwritten
10 - prove -v t/db_dependent/Koha/Patrons/Import.t
11 - prove -v t/db_dependent/Koha/Patrons.t

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a2bd027e5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e3da710f4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-22 16:29:08 +00:00
Jesse Maseto b60fa7296b Bug 21962: (RMaint follow-up) Fixed bad rebase.
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2018-12-19 13:18:51 -05:00
Kyle M Hall 0a6c0c3260 Bug 21849: Add unit tests
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>
(cherry picked from commit 2dbaaa3008)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa565b8e99)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2018-12-17 09:42:19 +00:00
Nick Clemens f9a4e36561 Bug 21962: Unit tests
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39c93e87f6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6b7e00b9c)
2018-12-18 19:19:39 +00:00
Josef Moravec 479967c4dd Bug 21911: Regression test
This tests usuall cases, but note, that administrator could make a
branch with code "%%%" or so, which this test does not cover, and some
functionalities will not work in that case: opac limit override,
                holdinbranch facet

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e5585a10d5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e6c3b1989)
2018-12-18 19:08:46 +00:00
Jonathan Druart 99824ca8a3 Bug 21910: Remove duplicated lines in tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee96d18b2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ab5318180)
2018-12-18 19:02:42 +00:00
Nick Clemens 77e846c441 Bug 21910: Koha::Library::Groups->get_search_groups should return the groups
To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3b8c66392)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e9ab97390)
2018-12-18 19:02:27 +00:00
Marcel de Rooy 82a55e971c Bug 21774: Cloned item subfields disappear when editing an item
Bug 10306 changed behavior on cloning item subfields by no longer splitting
constructions like 'A | B' in item fields like ccode.

If it is really recommended to clone item subfields, I am not so sure
about. But this patch at least restores the possibility to do so while
we discuss if we should ;)

Test plan:
[1] Run Items.t
[2] Make an item subfield repeatable in framework. And test edit items.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Also fixes the display of collections on the items
table (on editing items).

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5f34dd06ec)

Conflicts:
	t/db_dependent/Items.t
2018-12-12 17:27:44 +00:00
“Lucas Gass” 919e9567a6 Revert "Bug 21774: Cloned item subfields disappear when editing an item"
This reverts commit d6fe416578.
2018-12-12 17:19:57 +00:00
Marcel de Rooy d6fe416578 Bug 21774: Cloned item subfields disappear when editing an item
Bug 10306 changed behavior on cloning item subfields by no longer splitting
constructions like 'A | B' in item fields like ccode.

If it is really recommended to clone item subfields, I am not so sure
about. But this patch at least restores the possibility to do so while
we discuss if we should ;)

Test plan:
[1] Run Items.t
[2] Make an item subfield repeatable in framework. And test edit items.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Also fixes the display of collections on the items
table (on editing items).

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5f34dd06ec)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-07 22:01:16 +00:00
Mirko Tietgen 857b1524a9 Bug 21567: Move Koha_ExternalContent_OverDrive.t to db_dependent
This tests pass on the build step only because they are skipped, due to
the absense of Test::DBIx::Class library.

It makes sense for them to be in the db_dependent directory, as they are
not completely mocked (re: external world interactions).

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e78070b80)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-07 18:19:59 +00:00
Nick Clemens 1d797a8e5c Bug 20598: Update number of tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 119653a3a1)

Conflicts:
	t/db_dependent/Circulation.t
2018-12-04 19:00:35 +00:00
Kyle M Hall 25ea817edf Bug 20598: Unit test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b9ed7699e3)
2018-12-04 18:50:46 +00:00
Marcel de Rooy 2d1332938c Bug 18677: (QA follow-up) Trivial fixes to Chargelostitem.t
Kind of funny that we did not touch this test here. But it passed!
Trivial fixes:
[1] Typo precessfee
[2] Typo the linked
[3] Add rollback

Test plan:
Run t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fab9936ddb)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-03 19:05:57 +00:00
Jonathan Druart 8b02c6c3a1 Bug 18677: Remove new issue_id param from charlostitem
We have the itemnumber no need to pass the issue_id, we can retrieve it
from chargelostitem

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3475670881)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-03 19:05:32 +00:00
Jonathan Druart 6adfbd33f1 Bug 18677: Make the tests pass
Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cd250dae36)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-03 19:04:44 +00:00
Kyle M Hall b876d09e35 Bug 18677: issue_id is not added to accountlines for lost item fees
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>

[EDIT:]
Patch should have increased the number of tests obviously.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cde7a8e72c)

Signed-off-by: Jesse Maseto <jesse@bywatersolution.com>
2018-12-03 19:03:54 +00:00
Tomas Cohen Arazi 45eb022786
Bug 21749: (QA follow-up) Add more tests for ImportFramework
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>
(cherry picked from commit ecf68132b7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-11-23 16:10:58 +00:00
Jonathan Druart 9e46509487
Bug 21749: Add tests for ImportFramework
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>
(cherry picked from commit cbb90000fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-11-23 16:10:08 +00:00