Lines 4-10
Link Here
|
4 |
# This needs to be extended! Your help is appreciated.. |
4 |
# This needs to be extended! Your help is appreciated.. |
5 |
|
5 |
|
6 |
use Modern::Perl; |
6 |
use Modern::Perl; |
7 |
use Test::More tests => 10; |
7 |
use Test::More tests => 11; |
8 |
|
8 |
|
9 |
use t::lib::Mocks; |
9 |
use t::lib::Mocks; |
10 |
use t::lib::TestBuilder; |
10 |
use t::lib::TestBuilder; |
Lines 405-407
subtest "NoIssuesChargeGuarantorsWithGuarantees tests" => sub {
Link Here
|
405 |
|
405 |
|
406 |
$schema->storage->txn_rollback; |
406 |
$schema->storage->txn_rollback; |
407 |
}; |
407 |
}; |
408 |
- |
408 |
|
|
|
409 |
subtest "Patron messages tests" => sub { |
410 |
plan tests => 1; |
411 |
$schema->storage->txn_begin; |
412 |
my $today = output_pref({ dt => dt_from_string(), dateonly => 1}); |
413 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
414 |
my $library = $builder->build_object ({ class => 'Koha::Libraries' }); |
415 |
my $new_message_1 = Koha::Patron::Message->new( |
416 |
{ borrowernumber => $patron->id, |
417 |
branchcode => $library->branchcode, |
418 |
message_type => 'B', |
419 |
message => 'my message 1', |
420 |
})->store; |
421 |
|
422 |
my $new_message_2 = Koha::Patron::Message->new( |
423 |
{ borrowernumber => $patron->id, |
424 |
branchcode => $library->branchcode, |
425 |
message_type => 'B', |
426 |
message => 'my message 2', |
427 |
})->store; |
428 |
|
429 |
|
430 |
my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); |
431 |
like( $sip_patron->screen_msg, qr/Messages for you: $today: my message 1 \/ $today: my message 2/,"Screen message includes patron messages"); |
432 |
|
433 |
$schema->storage->txn_rollback; |
434 |
}; |