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 => 95; |
22 |
use Test::More tests => 92; |
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 GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) |
41 |
qw( ModSuggestion GetSuggestionInfo GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ) |
42 |
); |
42 |
); |
43 |
} |
43 |
} |
44 |
|
44 |
|
Lines 335-350
is(
Link Here
|
335 |
'GetSuggestionInfo returns the borrower number correctly' |
335 |
'GetSuggestionInfo returns the borrower number correctly' |
336 |
); |
336 |
); |
337 |
|
337 |
|
338 |
is( GetSuggestionFromBiblionumber(), undef, 'GetSuggestionFromBiblionumber without the biblio number returns undef' ); |
|
|
339 |
is( |
340 |
GetSuggestionFromBiblionumber(2), undef, |
341 |
'GetSuggestionFromBiblionumber with an invalid biblio number returns undef' |
342 |
); |
343 |
is( |
344 |
GetSuggestionFromBiblionumber( $biblio_1->biblionumber ), $my_suggestionid, |
345 |
'GetSuggestionFromBiblionumber functions correctly' |
346 |
); |
347 |
|
348 |
is( |
338 |
is( |
349 |
GetSuggestionInfoFromBiblionumber(), undef, |
339 |
GetSuggestionInfoFromBiblionumber(), undef, |
350 |
'GetSuggestionInfoFromBiblionumber without the biblio number returns undef' |
340 |
'GetSuggestionInfoFromBiblionumber without the biblio number returns undef' |
351 |
- |
|
|