Bug 24359: (QA follow-up) Fix tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 1 Mar 2021 18:41:21 +0000 (15:41 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 12 Mar 2021 08:45:30 +0000 (09:45 +0100)
commitb21e489a1332e0db48dfeed525eca81cb65c0743
tree16896751d0b2cc7c39476412f168cf2cd48aa2c8
parent7131ed22e01f6a20811fe05b643e86883df9a59d
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>
(cherry picked from commit ac7d1124ab0db1a532496b2b3f5c0c75a781a20f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/HoldsQueue.t