Commit graph

14 commits

Author SHA1 Message Date
Kenza Zaki
d2a7561288 Bug 10499: VirtualShelves.t - wrap tests in a database transaction
Before this patch, the queries in VirtualShelves.t were committed in the
database and have to be removed at the end.

This patch wraps tests in a database transaction.

Test plan:
prove t/db_dependent/VirtualShelves.t
VirtualShelves.t .. ok
All tests successful.
Files=1, Tests=72,  1 wallclock secs ( 0.06 usr  0.00 sys +  0.72 cusr  0.06 csys =  0.84 CPU)
Result: PASS

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-16 14:17:27 +00:00
93e87ca0b6 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>
2013-06-28 05:19:49 -07:00
1ef99ace20 Bug 10290: Followup for Virtualshelves.t
Put the 10 biblionumbers in a list
Add a FIXME for deleting shelves
Do temporary repair on duplicate name test (Followup via report 10386)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-03 07:29:07 -07:00
Jonathan Druart
44905ac99c Bug 10290: UT: VirtualShelves.t needs to create its own data
Try before the patch:
prove t/db_dependent/VirtualShelves.t

And after, it should produce:
  t/db_dependent/VirtualShelves.t .. ok
  All tests successful.
  Files=1, Tests=82,  6 wallclock secs ( 0.03 usr  0.00 sys +  0.46 cusr  0.03 csys =  0.52 CPU)
  Result: PASS

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-06-03 07:29:05 -07:00
dd3ebe9a6e Bug 7310: Updated VirtualShelves unit test
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
2012-03-21 16:47:05 +01:00
01bf4aa658 fix typo/thinko in list test
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 10:55:44 -04:00
037686eff2 various improvements to t/db_dependent/VirtualShelves.t
* updated to reflect recent (and old) changes to the API
* corrected test plan
* adopted Test::More
* correctly handle and test functionality to not add duplicate
  bibs to a list

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 10:39:57 -04:00
Chris Cormack
9b0bd43f10 Fixing the VirtualShelves test
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 07:58:34 -04:00
Donovan Jones
23a19c6c9a Bug 2505 - Add commented use warnings where missing in *.t 2010-04-21 20:29:31 +12:00
088b22b8ed More fixes to the shelves test 2010-01-29 08:39:09 +13:00
031a7c8379 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:39:08 +13:00
98e972128a More fixes to the shelves test 2010-01-29 08:13:42 +13:00
af75714431 Fixing the tests for VirtualShelves, still a bit more to do 2010-01-29 08:13:41 +13:00
Galen Charlton
156cbf4eb6 DB-dependent tests moved
Moved test cases that depend on the DBMS and having
an initialized Koha database to a subdirectory
of t so that they will not be swept up into
the default 'make test'.  Goal is to have
these DB-dependent tests runnable either via
a special make target or perhaps from the
web installer.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:07:38 -06:00
Renamed from t/VirtualShelves.t (Browse further)