Bug 13172

Summary: t/Koha_Email.t depends on the database
Product: Koha Reporter: Chris Cormack <chris>
Component: Test SuiteAssignee: Chris Cormack <chris>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: major    
Priority: P5 - low CC: robin, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13172 t/Koha_Email.t was database dependent
Bug 13172 t/Koha_Email.t was database dependent
[PASSED QA] Bug 13172 t/Koha_Email.t was database dependent

Description Chris Cormack 2014-10-30 22:08:18 UTC
C4::Context->preference needs to be mocked
Comment 1 Chris Cormack 2014-10-30 22:17:02 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2014-10-30 22:58:43 UTC Comment hidden (obsolete)
Comment 3 Robin Sheat 2014-10-30 23:00:54 UTC
Going to break the rules a bit here and mark this as signed off because it's needed for package builds.
Comment 4 Katrin Fischer 2014-10-30 23:38:46 UTC
Created attachment 33015 [details] [review]
[PASSED QA] Bug 13172 t/Koha_Email.t was database dependent

To test
1/ Stop your database server
2/ run t/Koha_Email.t
3/ Notice the errors
4/ Apply patch
5/ run t/Koha_Email.t again
6/ No errors

(Don't forget to restart your db server after)

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Verified that it fixes a package build.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tests pass now without database connection.
Comment 5 Tomás Cohen Arazi 2014-10-31 16:16:33 UTC
Patch pushed to master.

Thanks Chris!