Bug 13172 - t/Koha_Email.t depends on the database
Summary: t/Koha_Email.t depends on the database
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Chris Cormack
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 22:08 UTC by Chris Cormack
Modified: 2015-06-04 23:33 UTC (History)
2 users (show)

See Also:
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 (1.04 KB, patch)
2014-10-30 22:17 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 13172 t/Koha_Email.t was database dependent (1.13 KB, patch)
2014-10-30 22:58 UTC, Robin Sheat
Details | Diff | Splinter Review
[PASSED QA] Bug 13172 t/Koha_Email.t was database dependent (1.26 KB, patch)
2014-10-30 23:38 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!