]> git.koha-community.org Git - koha.git/commit
Bug 24760: Use C4::BackgroundJob->fetch in tests
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 28 Feb 2020 13:22:34 +0000 (14:22 +0100)
committerJoy Nelson <joy@bywatersolutions.com>
Thu, 2 Apr 2020 16:19:10 +0000 (16:19 +0000)
commitc1c3cfed5ca2709b99587e8907b68d158ce013f9
tree0c1dbb9cbe290f0bbef21bd0da556aaab675ea9f
parent508a6ad027b34c2279fbb1ff994152144b38ceb8
Bug 24760: Use C4::BackgroundJob->fetch in tests

Starting with YAML 1.30 and YAML::Syck 1.32, these modules don't bless
loaded objects by default. This is not a problem as
C4::BackgroundJob->fetch bless them anyway.

So, instead of testing what's in the session, test the result of
C4::BackgroundJob->fetch, which is what's used everywhere else

Test plan:
1. Install latest version of YAML::Syck (or YAML if YAML::Syck is not
installed)
2. prove t/db_dependent/BackgroundJob.t => should FAIL
3. Apply patch
4. prove t/db_dependent/BackgroundJob.t => should PASS
5. Verify that background jobs are still working (for instance,
tools/batchMod.pl)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
t/db_dependent/BackgroundJob.t