View | Details | Raw Unified | Return to bug 23781
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Recall.t (+8 lines)
Lines 126-131 $expected_expirationdate = dt_from_string->add({ days => 3 }); Link Here
126
$expirationdate = $recall2->calc_expirationdate;
126
$expirationdate = $recall2->calc_expirationdate;
127
is( t::lib::Dates::compare( $expirationdate, $expected_expirationdate ), 0, "Expiration date calculated based on circulation rules" );
127
is( t::lib::Dates::compare( $expirationdate, $expected_expirationdate ), 0, "Expiration date calculated based on circulation rules" );
128
128
129
C4::Members::Messaging::SetMessagingPreference(
130
    {
131
        borrowernumber          => $patron1->borrowernumber,
132
        message_attribute_id    => 12,                         # Recall_Waiting
133
        message_transport_types => [qw( email sms )],
134
    }
135
);
136
129
$recall2->set_waiting({ expirationdate => $expirationdate });
137
$recall2->set_waiting({ expirationdate => $expirationdate });
130
is( $recall2->waiting, 1, "Recall is waiting" );
138
is( $recall2->waiting, 1, "Recall is waiting" );
131
139
(-)a/t/db_dependent/Koha/Recalls.t (-2 / +9 lines)
Lines 68-73 Koha::CirculationRules->set_rules({ Link Here
68
C4::Circulation::AddIssue( $patron3, $item1->barcode );
68
C4::Circulation::AddIssue( $patron3, $item1->barcode );
69
C4::Circulation::AddIssue( $patron3, $item2->barcode );
69
C4::Circulation::AddIssue( $patron3, $item2->barcode );
70
70
71
C4::Members::Messaging::SetMessagingPreference(
72
    {
73
        borrowernumber          => $patron3->borrowernumber,
74
        message_attribute_id    => 13,                         # Recall_Requested
75
        message_transport_types => [qw( email sms )],
76
    }
77
);
78
71
my ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({
79
my ( $recall, $due_interval, $due_date ) = Koha::Recalls->add_recall({
72
    patron => undef,
80
    patron => undef,
73
    biblio => $biblio1,
81
    biblio => $biblio1,
Lines 147-153 is( Link Here
147
is( t::lib::Dates::compare( $due_date, $expected_due_date ), 0, "Due date correctly returned" );
155
is( t::lib::Dates::compare( $due_date, $expected_due_date ), 0, "Due date correctly returned" );
148
156
149
my $messages_count = Koha::Notice::Messages->search({ borrowernumber => $patron3->borrowernumber, letter_code => 'RETURN_RECALLED_ITEM' })->count;
157
my $messages_count = Koha::Notice::Messages->search({ borrowernumber => $patron3->borrowernumber, letter_code => 'RETURN_RECALLED_ITEM' })->count;
150
is( $messages_count, 3, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" );
158
is( $messages_count, 6, "RETURN_RECALLED_ITEM notice successfully sent to checkout borrower" );
151
159
152
my $message = Koha::Recalls->move_recall;
160
my $message = Koha::Recalls->move_recall;
153
is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" );
161
is( $message, 'no recall_id provided', "Can't move a recall without specifying which recall" );
154
- 

Return to bug 23781