Bug 23971: (follow-up) Fix tests
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 23 Oct 2020 14:14:28 +0000 (15:14 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Apr 2021 09:58:49 +0000 (11:58 +0200)
commitab61e94dc90a9997182621265ad3790f62f36313
tree5c173aa8743c1e30da335c0d7a1320cf4b00c2e8
parent7fd3eaa24736bc7370980d21aea26f0713209182
Bug 23971: (follow-up) Fix tests

Following a discussion with Tomás on Slack, this commit implements the
following suggestions:

- Switch from ->find to ->search in tests. ->find is only ever going to return 0
or 1 rows, which doesn't help us if there is breakage which results in
more than 1 row being returned, the test would fail due to ->find not
expecting more than 1 row, but we should be testing for it. So switching
to ->search returns all matching rows.
- Moved tests into their own subtest, they had the potential to pollute
surrounding tests
- Remove all action logs before each test, this ensures we're only
testing the result of the current test

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/Acquisition.t