Commit graph

711 commits

Author SHA1 Message Date
Matthias Meusburger
c3ff4298fc Bug 13507: (regression test) Intranet URL returned by C4::Auth_with_cas::_url_with_get_params
C4::Auth_with_cas::_url_with_get_params should return the right
URL for intranet.

Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Edit: added a proper commit message. Sort of :-P
2015-04-08 12:02:26 -03:00
589fd84107 Bug 13841 - Unit Test
Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:36:02 -03:00
Jonathan Druart
e887ae544d Bug 11201: Add a in-house use list pages
The circulation page has a new entry: a link to a list of the pending
in-house use.

Bug 10860 introduces a new way for managing in-house uses.
This patch adds a new page (from the circulation home page) to list all
pending in-house uses.

Test plan:
Go on the circulation home page and click on the in-house use link.
Verify all your in-house uses are listed and information are consistent.

Bug 11201: Display lib instead of AV code

This patch assumes that items.location is linked the the LOC
authorised values.

Signed-off-by: Nicole <nicole@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-31 11:30:55 -03:00
Srdjan
1802aa9153 Bug 5786 - Move AllowOnShelfHolds and OPACItemHolds system prefs to the Circulation Matrix
C4::Reserves:
* Added OnShelfHoldsAllowed() to check issuingrules
* Added OPACItemHoldsAllowed() to check issuingrules
* IsAvailableForItemLevelRequest() changed interface, now takes
  $item_record,$borrower_record; calls OnShelfHoldsAllowed()

opac/opac-reserve.pl and opac/opac-search.pl:
* rewrote hold allowed rule to use OPACItemHoldsAllowed()
* also use OnShelfHoldsAllowed() through
* IsAvailableForItemLevelRequest()

templates:
* Removed AllowOnShelfHolds and OPACItemHolds global flags, they now
  only have meaning per item type

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

I have tested this patch left, right and upside down for the last
several months. All tests have passed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-25 10:33:14 -03:00
1d0143641f Bug 13713: Follow-up removing biblioitem routines
There is no need to define biblioitem routines, if we can access them
via biblioitemnumber.
Note that we actually need a FK for biblio in the items table. Now we do
need the intermediate level via biblioitems in the Items.t code. Even better,
we should move biblioitem to biblio. Formally it is 1-n, but in reality it
is 1-1.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-19 14:06:01 -03:00
Jonathan Druart
c2a86a4ee0 Bug 13713: Remove useless constraints previously added
This patch removes the 3 constraints added by patch from bug 11518.
Having 1-n + 1-1 relations for the same field is a non-sense.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a follow-up for removing some unneeded code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-19 14:05:45 -03:00
Jonathan Druart
476febe5db Bug 13746: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-15 08:40:12 -03:00
c6249a08f3 Bug 11430: (QA followup) we test for warnings, always
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 15:14:24 -03:00
Jonathan Druart
252a4ea3b7 Bug 11430: UT: add unit tests to delete only selected lines
Signed-off-by: sonia BOUIS <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 15:02:39 -03:00
105f8f57f2 Bug 12648: QA Followup
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 11:48:18 -03:00
Jonathan Druart
753cbc4040 Bug 12648: Add unit tests for C4::Acquisition::*OrderUsers
Test plan:
Verify that unit tests pass with
    prove t/db_dependent/Acquisition/OrderUsers.t

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-11 11:47:33 -03:00
Benjamin Rokseth
7ba06aad68 Bug 12122: TransferSlip should accept both itemnumber and barcode
Added small patch to allow barcode as input in TransferSlip routine, mostly
to allow generating transfer slips where only barcode is present (aka.
javascript).

Test plan:
1) find book with <barcode> and <itemnumber>
2) generate transferslips with both:
  transfer-slip.pl?transferitem=<itemnumber>3967925&amp;branchcode=MPL&amp;op=slip
  transfer-slip.pl?barcode=<barcode>&amp;branchcode=MPL&amp;op=slip
and verify that the generated slips match.

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

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

Edit:
 - Added tests in t/db_dependent/Circulation_transfers.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Passes tests and QA script.
Works with both itemnumber or barcode as described.
Tested printing transfer slips with the URL examples given
and in the UI.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-05 11:47:12 +01:00
Jonathan Druart
354ee6d427 Bug 13645: Cache the DBIx connection
We don't want to recreate a new connection to the DB every time we want
a new schema.

This patch creates a $database package level variable on the same way
it's done in C4::Context for $dbh.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-02-20 14:37:08 -03:00
Jonathan Druart
f82064286d Bug 12669: Centralize the timezone handle into Koha::DateUtils
This patch adds unit tests for the previous changes and centralize the
timezone handle into the Koha::DateUtils module.
Like that the behavior will affect all date manipulations using this
module (should be all dates in Koha).

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>
2015-02-20 10:20:30 -03:00
d562df4af2 Bug 13019 [QA Followup] - Allow find() and search() to be called as static methods
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:05 -03:00
Jonathan Druart
3107975ba9 Bug 13019: (follow-up) Remove smartmatch operator
This patch also adds 1 test.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:03 -03:00
6f0316a8d2 Bug 13019 - Add base classes on which to build Koha objects
The idea behind this is to have a pair of base classes on which to build
our new generation of Koha objects. Koha::Object is a base class, which
in it's most basic form, is to represent a row in a table. For example,
Koha::Borrower inherits from Koha::Object. So too could Koha::Biblio
and Koha::Item for example.

Koha::Objects is to represent a way to fetch and manipulate sets of
objects. For example, Koha::Borrowers has a method to get a
Koha::Borrower object by id and a method to search for an get a list
of Koha::Borrower objects. Right now Koha::Objects has only the
essentials but can easily be extended and those enhancements will be
passed down to all the child classes based on it.

By using these classes as a base, we will add consistency to our
code, allow us to keep our code DRY, reduce bugs, and encapsulate our
database access among other benefits.

Test Plan:
1) Apply this patch
2) prove t/Object.t t/db_dependent/Object.t t/db_dependent/Objects.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:01 -03:00
Jonathan Druart
f19a1777a0 Bug 13319: Fix Koha::Acq::Order should set parent_ordernumber
The tests highligh the problem: if the parent_ordernumber attribute is
not set on inserting an order, the object returned by the method does
not contain the value (undef).

Test plan:
Verify the tests are consistent and
    prove t/db_dependent/Acquisition/CancelReceipt.t
should return green.

You can also verify that receive partially an order and cancel the
receipt work as expected.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-10 11:24:08 -03:00
Jonathan Druart
cf8cc47f6d Bug 10900: 2 occurrences more
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:17 -03:00
Mark Tompsett
bd769213eb Bug 10900 - Follow up, since more has been added to master
Booksellers.t and Koha_template_plugin_Branches.t both had
function calls to ::set_userenv added to them. This patch handles
those additions.

TEST PLAN
---------
1) Branch a new git branch
2) prove -v t/db_dependent/Bookseller.t
   -- It should work.
3) prove -v t/db_dependent/Koha_template_plugin_Branches.t
   -- It should work.
4) Apply only the first patch.
5) Repeat steps 2 and 3.
   -- They should both FAIL!
6) Apply the second patch as well.
7) Repeat steps 2 and 3.
   -- The should both work.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:15 -03:00
Mark Tompsett
78d6d794fe Bug 10900 - Incorrect calling conventions accessing C4::Context
There were multiple calling conventions for C4::Context's
set_userenv routine. So the following commands were used to
find discrepancies:
    grep "::set_userenv" `find .`
    grep "\->set_userenv" `find .`

The first grep demonstrated that the smaller change is from
:: to -> as only C4/Auth.pm, installer/InstallAuth.pm, and
t/db_dependent/Circulation.t would need to be modified. This
patch corrects C4::Context's set_userenv routine to be object
call based (use ->) by using a shift to ignore the first
parameter, and modify the three files found with :: calls.

As the result of trying to roll a distribution,
t/Circulation_barcodedecode.t was discovered to be faulty. The
cause being incorrect parameters! This was hidden when there
was no shift in the set_userenv routine. However, with its
correction, the test broke.

This led me to read the POD documentation for the function
set_userenv in C4::Context and realize it was outdated as
well. It has been revised to match the current version of
the function.

Then intentionally bad parameters passed to the set_userenv
routine in C4::Context were hunted down. The biggest problems
were missing surnames or branch names.

Rebase required because of shibboleth change in C4/Context.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 17:00:13 -03:00
Jonathan Druart
f7220ba072 Bug 13007: Special case budgetid == ''
In this special case (the suggestion is linked to "all funds"), the
budgetid value should be NULL in DB.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes old and new tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:49:57 -03:00
Jonathan Druart
311afaaf91 Bug 13007: Add a foreign key for suggestions.budgetid
The DB field suggestions.budgetid should be linked to
aqbudgets.budget_id.

If the fund is removed, this column should be set to NULL.

Test plan:
1/ Using your SQL CLI (or equivalent), create or update 1+ suggestions and
set "0" in the budgetid field (or a nonexistent budget id).
2/ Execute the updatedabase script.
3/ Verify that your suggestion is unlinked to the nonexistent fund.
4/ Verify the constraint has correctly been added (show create table
suggestions).
5/ Check that this change does not affect the behavior on adding a
suggestion (linked to a fund or not).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 15:49:50 -03:00
Julian Maurice
f70ad43f8f Bug 13562: Fix item search on item MARC subfields
Test plan:
1. Add 4 item search fields (in Administration › Items search fields):
   a. 1 biblio field linked to a DB field
   b. 1 biblio field not linked to a DB field
   c. 1 item field linked to a DB field
   d. 1 item field not linked to a DB field
2. Make sure you have some data in those fields to search on.
3. Go to item search page and do a search using these new fields, make
   sure the result is correct.

Signed-off-by: Nick <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-09 10:28:09 -03:00
e5b834a1c4 Bug 7904: (QA followup) fix tests
The package name for SIP wasn't fixed in the tests by the original patches.

This patch fixes it.

To test:
- Run
  $ prove t/db_dependent/SIP_ILS.t
- Tests should pass with the patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 15:50:32 -03:00
42c342972a Bug 13262: (QA followup) fix duplicate variable definition
Running

 $ prove t/db_dependent/XSLT_Handler.t

raises a couple warnings because of variable redefinitions. This small patch fixes that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 15:25:50 -03:00
d3c128af9d Bug 13262 - Add parameters to XSLT Handler transform method
This patch adds an optional hashref argument to the XSLT_Handler
transform() method. It allows you to send key => value pairs
parameters to the XML::LibXSLT object, which you can reference
in a XSLT via <xsl:param name="XXX" />.

The parameter value is evaluated as an XPath query, so you can only
pass quoted strings (i.e. "'test'") or numbers. Otherwise, the
XSLT engine will interpret it as a Xpath query and will run it
on the XML that you're transforming.

The most common use case is sending strings to a XSLT. In my case,
this is an OAI-PMH identifier that comes in a OAI response but not
the actual metadata. See the following link from the official POD:
http://search.cpan.org/~shlomif/XML-LibXSLT-1.92/LibXSLT.pm#Parameters

_TEST PLAN_

1) Run "perl t/db_dependent/XSLT_Handler.t". If all tests pass,
you should be free to sign off. Feel free to inspect the last
test in XSLT_Handler.t and the XSL in test04.xsl to see how it
works.

If you really want to be thorough, you could write your own test
cases using mine as an example.

Alternatively, you could go into C4::XSLT, and try to pass a
value to a parameter in the search results or the detail page,
but that might be a bit over the top.

It's a pretty simple patch.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 15:24:29 -03:00
Jonathan Druart
74640683f0 Bug 13333: Fix Display basket group for already received orders
Bug 11111 adds a basket group column on the parcel page.
But it seems that the already received orders never contain the value
(always 'no basket group').

Test plan:
Receive an order which is in a basket group and verify the basket group
column is correctly filled.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:51:34 -03:00
Mark Tompsett
01c7c2a129 Bug 13457 - Followup for CPL and S codes
Based on comment #3, this corrects CPL and S issues if they do
not exist in the DB.

TEST PLAN
---------
0) Backup your DB.
1) Clear CPL and S from your DB.
   - delete from borrowers where categorycode='S';
   - delete from categories where categorycode='S';
   - delete from borrowers where branchcode='CPL';
   - delete from branch where branchcode='CPL';
2) prove t/db_dependent/Suggestions.t
   -- This should fail.
3) Apply patch
4) prove t/db_dependent/Suggestions.t
   -- This should work.
5) Intentionally add categorycode 'S' and branchcode 'CPL' back
   into the database.
6) prove t/db_dependent/Suggestions.t
   -- This should work.
7) run koha qa test tools.
8) Restore your DB :)

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:49:02 -03:00
Mark Tompsett
bfb035511e Bug 13457: Suggestions.t expects sample itemtypes
TEST PLAN
---------
1) Make sure you have more than 8 item types, and preferably
   something with a non-sample default code for itemtypes.
2) prove t/db_dependent/Suggestions.t
   -- this will fail
3) Apply patch
4) prove t/db_dependent/Suggestions.t
   -- this will succeed
5) run koha qa test tools

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:48:56 -03:00
cb2f8f6635 Bug 12973: (QA followup) warnings are features, test them
This patch makes the test look for the warnings Koha::XSLT_Handler raises
instead of just throwing them to STDERR.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-18 10:29:19 -03:00
97acd9511e Bug 12973: Additional unit tests for XSLT_Handler.t
The additional way of parameter passing is tested in three additional
tests.

Test plan:
Verify if XSLT_Handler.t passes.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-18 10:29:15 -03:00
Jonathan Druart
8b19fd4b0d Bug 12850: C4::Serials::GetLateIssues can be removed
This routine is not used and can be removed.

Test plan:
  git grep GetLateIssues
should not return any result

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 21:32:03 -03:00
Jonathan Druart
178e51cad7 Bug 13579: Prefer like instead of ok to match a regex
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 12:24:29 -03:00
29ebdc3ad5 Bug 13579: (regression tests) Encoding issues on about > timeline get tested
This patch introduces two tests for encoding issues on about > timeline

To test:
- Apply the patch and run
  $ KOHA_USER=kohaadmin KOHA_PASS=katikoan KOHA_INTRANET_URL=http://koha-dev.biblioadmin prove t/db_dependent/www/history.t
  (adjust to your own settings, the user needs to have access to the about page)

Regards

Signed-off-by: Manuel Cohen Arazi <manuelcohenarazi@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-14 12:24:22 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Zeno Tajoli
021c3695e8 Bug 13264: Follow up on record files: deleted fields (952/995) with items info
To insert items info you need to use correct code of sublibrary, not always the code is correct. Items info are not important for this test, so the fields are deleted (952 in MARC21, 995 in UNIMARC)

http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:27 -03:00
Zeno Tajoli
556b15f725 Bug 13264: More tests for Latin-1 vs. UTF-8 interpretation
New tests in search_utf8.t, now are tested also records with only utf-8 chars that could see also as latin-1 chars

http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:27 -03:00
Zeno Tajoli
0f8589483f Bug 13264: Update of unimarc and marc21 record to search publisher
http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:27 -03:00
Zeno Tajoli
4c7de64b3a Bug 13264: Add Latin-1 vs UTF-8 test specific records
This patch addes two new files .mrc for marc21 and unimarc to test chars in utf8/latin-1 section only, to be sure that perl doesn't switch between utf-8 nad ISO 8859-1 inside itself.

http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:27 -03:00
Zeno Tajoli
6691d273cd Bug 13264: Add tests for Latin-1 vs. UTF-8 deduction
add a test in auth_values_input_www to check chars that could be Latin-1 or UTF-8

http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
Zeno Tajoli
04ef213dec Bug 13264: Add more records to the marc21 aand unimarc files
Dupliacate record in marc21 and unimarc files, so the search finds always more than one result.

http://bugs.koha-community.org/show_bug.cgi?id=13264
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
9bba9fb386 Bug 13264: (QA followup) prevent double-encoding on the tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
Jonathan Druart
72563473ae Bug 13264: Refactor search utf8 tests and add some more
t/db_dependent/www/search_utf8.t and
t/db_dependent/www/intranet_search_utf8.t were quite similar, I merged
them into a single file (t/db_dependent/www/search_utf8.t).
On the way, I added some tests for them.

Note that you will need the last patch on branch bug_11944 to see the
tests pass.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
Emmanuele Somma
2e368c1478 Bug 13264: Additional test for search in intranet calatogue
The utf-8 test do: insert a biblio record with tool, search the record in intranet,
delete batch upload and biblio records.

To test: prove intranet_search_utf8.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
Zeno Tajoli
20a7f1d038 Bug 13264: Follow up: in opac_utf8.t insert also delete of biblio
In previous version of the test opac_utf8.t clears import from resevoir
but it doesn't delete record from biblio table in MySQL.
This the standard work of the feature, see:
http://manual.koha-community.org/3.18/en/catalogtools.html#managestaged

Now the script deletes also record on MySQL level.
No necessary on Zebra level because it uses a temporaney Zebra index that it is
clenaned at the end of the script.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
5e43f20a44 Bug 13264: Make opac_utf8.t launch its own helper processes
This patch makes opac_utf8.t launch its own:
- zebrasrv process
- rebuild_zebra.pl (daemon mode)

It also takes care of killing them when finished. It sets a frecquency
of 5 seconds for the indexer, and waits 10 just in case before looking
for the indexed records.

To test:
- Just launch the tests.

Edit: fixes on the license text.

Regards
Tomas

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:26 -03:00
0f44011336 Bug 13264: no need to test for MySQL
This patch removes the test for a running MySQL process.
It is already implied by successfuly loading C4::Context.

It also fixes the license text.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:25 -03:00
Zeno Tajoli
44ed6c37c5 Bug 13264: Test for utf-8 on authorised values input/display/delete
This test check utf-8 support on web intranet interface for authorized values.
It test input, search and delete of utf-8 values.
If all OK it destroy values inserted

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:25 -03:00
Zeno Tajoli
fb9eb5737b Bug 13264: Test for utf-8 on Opac search
This test need to setup zebraserver and background indexing.
You need to set also KOHA_INTRANET_URL and KOHA_OPAC_URL
in the user enviroment.

It imports sample records and retrieves them on hte OPAC through
Apache.

To run it: prove opac_utf8.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-01-13 12:43:25 -03:00