|
Lines 45-55
use t::lib::Mocks;
Link Here
|
| 45 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
45 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
| 46 |
use Koha::Acquisition::Order; |
46 |
use Koha::Acquisition::Order; |
| 47 |
use Koha::Acquisition::Bookseller; |
47 |
use Koha::Acquisition::Bookseller; |
|
|
48 |
use Koha::Database; |
| 48 |
|
49 |
|
| 49 |
my $dbh = C4::Context->dbh; |
50 |
my $dbh = C4::Context->dbh; |
| 50 |
|
51 |
|
|
|
52 |
my $database = Koha::Database->new(); |
| 53 |
my $schema = $database->schema(); |
| 54 |
$schema->storage->txn_begin(); |
| 55 |
|
| 51 |
# Start transaction |
56 |
# Start transaction |
| 52 |
$dbh->{AutoCommit} = 0; |
|
|
| 53 |
$dbh->{RaiseError} = 1; |
57 |
$dbh->{RaiseError} = 1; |
| 54 |
|
58 |
|
| 55 |
$dbh->do(q|DELETE FROM letter|); |
59 |
$dbh->do(q|DELETE FROM letter|); |
|
Lines 341-344
is($err, 1, "Successfully sent claim");
Link Here
|
| 341 |
is($mail{'To'}, 'testemail@mydomain.com', "mailto correct in sent claim"); |
345 |
is($mail{'To'}, 'testemail@mydomain.com', "mailto correct in sent claim"); |
| 342 |
is($mail{'Message'}, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Claim notice text constructed successfully'); |
346 |
is($mail{'Message'}, 'my vendor|John Smith|Ordernumber ' . $ordernumber . ' (Silence in the library) (1 ordered)', 'Claim notice text constructed successfully'); |
| 343 |
|
347 |
|
| 344 |
$dbh->rollback; |
348 |
$schema->storage->txn_rollback(); |
| 345 |
- |
|
|