Bug 24359: (QA follow-up) Fix tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 1 Mar 2021 18:41:21 +0000 (15:41 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 Mar 2021 09:31:46 +0000 (10:31 +0100)
commitac7d1124ab0db1a532496b2b3f5c0c75a781a20f
tree021437251ca94f4cdbea3dbcd2d100abb9088b17
parent445ca21ff06ca2e4f3a59d0a70c8bce6533168db
Bug 24359: (QA follow-up) Fix tests

This patch fixes a rebase issue, and also makes sure the tests do not
rely on any prior data. The query on tmp_holdsqueue is done against the
actual reserve_id so no need to delete all the data from the
tmp_holdsqueue and hold_fill_targets table.

I also noticed the previous subtest wasn't run inside a transaction even
if the code was designed to not depend on prior data as well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/HoldsQueue.t
=> SUCCESS: Tests pass!
3. 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>
t/db_dependent/HoldsQueue.t