Bug 24760: Use C4::BackgroundJob->fetch in tests
commita7de3ebf8b9e834bb00c2fe07464657f2e1d1b9b
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 28 Feb 2020 13:22:34 +0000 (28 14:22 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Mar 2020 14:58:11 +0000 (6 14:58 +0000)
tree7f007a67877b1dc6dce1dfaf4e13aa85830d7e3b
parent7da21c6a10f944a21c96d0ce9a9d4494a4ae1560
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>
t/db_dependent/BackgroundJob.t