]> git.koha-community.org Git - koha.git/commit
Bug 10386: improvements to VirtualShelves.t
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 3 Jun 2013 13:27:50 +0000 (15:27 +0200)
committerChris Hall <followingthepath@gmail.com>
Sat, 17 Aug 2013 22:58:14 +0000 (10:58 +1200)
commit96666e5aaaab924539e4a5759f2cc292750d6d4b
treee3d73347084f4b1986b6800c99d4b5bb5f7cd0b2
parentbab007fb750bf9428d71637e26743346c703c0e0
Bug 10386: improvements to VirtualShelves.t

Most important: Does no longer delete all shelves!
Checks if there are ten borrowers for testing. But even works without them :)
When creating or modifying lists, takes name clashes into consideration.

Small change to _CheckShelfName in VirtualShelves module. Making it possible to
check a name for a list whose owner has been set to NULL. Note that a test
like field=? with undef for placeholder will not work in MySql.

Test plan:
How do you test a test? Well, you could run it on various databases..
But for real hacking, you could also add some debug lines.
I tested this by forcing 10 undefs in @borrowernumbers.
And by overwriting the return value of randomname with an existing name.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 93e87ca0b61611fc35238bf13eb226f477cf9c4e)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a97b62379f82a94157916959109c7c1a75582d8a)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a97b62379f82a94157916959109c7c1a75582d8a)

Fixed minor conflicts:
C4/VirtualShelves.pm
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 5e9db705a5466ff508d45a9bbfcabd9744efa53f)
C4/VirtualShelves.pm
t/db_dependent/VirtualShelves.t