Bug 37623: Make t/db_dependent/Letters.t idempotent
The tests should be unaffected by system preference settings, such as EmailFieldPrimary. To test: 1. Log into the staff interface 2. Go to Koha Administration -> Global system preferences, and search for EmailFieldPrimary 3. Change the EmailFieldPrimary preference to something other than 'primary email' and 'first valid email address', i.e. any of the following: * alternate email * card number * secondary email * selected addresses 4. Run tests t/db_dependent/Letters.t and notice they fail 5. Apply the patch 6. Run the tests again t/db_dependent/Letters.t with different settings of EmailFieldPrimary. The tests should always pass. Sponsored-by: Pymble Ladies' College Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
42b197679e
commit
0e61e56e57
1 changed files with 1 additions and 0 deletions
|
@ -74,6 +74,7 @@ my $dbh = C4::Context->dbh;
|
|||
$dbh->do(q|DELETE FROM letter|);
|
||||
$dbh->do(q|DELETE FROM message_queue|);
|
||||
$dbh->do(q|DELETE FROM message_transport_types|);
|
||||
t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' );
|
||||
|
||||
my $library = $builder->build({
|
||||
source => 'Branch',
|
||||
|
|
Loading…
Reference in a new issue