Lines 19-25
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use DateTime::Duration; |
20 |
use DateTime::Duration; |
21 |
use Test::NoWarnings; |
21 |
use Test::NoWarnings; |
22 |
use Test::More tests => 55; |
22 |
use Test::More tests => 52; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
|
24 |
|
25 |
use t::lib::Mocks; |
25 |
use t::lib::Mocks; |
Lines 38-44
use Koha::Suggestions;
Link Here
|
38 |
BEGIN { |
38 |
BEGIN { |
39 |
use_ok( |
39 |
use_ok( |
40 |
'C4::Suggestions', |
40 |
'C4::Suggestions', |
41 |
qw( ModSuggestion ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) |
41 |
qw( ModSuggestion DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) |
42 |
); |
42 |
); |
43 |
} |
43 |
} |
44 |
|
44 |
|
Lines 310-324
$messages = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber2
Link Here
|
310 |
|
310 |
|
311 |
is( scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error' ); |
311 |
is( scalar(@$messages), 1, 'No new letter should have been generated if the update raised an error' ); |
312 |
|
312 |
|
313 |
is( ConnectSuggestionAndBiblio(), '0E0', 'ConnectSuggestionAndBiblio without arguments returns 0E0' ); |
313 |
my $biblio_2 = $builder->build_object( { class => 'Koha::Biblios' } ); |
314 |
my $biblio_2 = $builder->build_object( { class => 'Koha::Biblios' } ); |
|
|
315 |
my $connect_suggestion_and_biblio = ConnectSuggestionAndBiblio( $my_suggestionid, $biblio_2->biblionumber ); |
316 |
is( $connect_suggestion_and_biblio, '1', 'ConnectSuggestionAndBiblio returns 1' ); |
317 |
$suggestion = Koha::Suggestions->find($my_suggestionid)->unblessed(); |
318 |
is( |
319 |
$suggestion->{biblionumber}, $biblio_2->biblionumber, |
320 |
'ConnectSuggestionAndBiblio updates the biblio number correctly' |
321 |
); |
322 |
|
314 |
|
323 |
my $del_suggestion = { |
315 |
my $del_suggestion = { |
324 |
title => 'my deleted title', |
316 |
title => 'my deleted title', |
325 |
- |
|
|