3 # This Koha test module is a stub!
4 # Add more tests here!!!
12 use Test
::More tests
=>9;
15 use_ok
('C4::Suggestions');
18 my ($suggestionid, $suggestion, $status, $biblionumber);
20 ok
($suggestionid= NewSuggestion
( {title
=>'Petit traité de philosohpie',author
=>'Hubert de Chardassé',publishercode
=>'Albin Michel'} ), "NewSuggestion OK");
21 ok
($suggestion= GetSuggestion
( $suggestionid), "GetSuggestion OK");
22 ok
($status= ModSuggestion
( {title
=>'test Modif Simple', suggestionid
=>$suggestionid} ), "ModSuggestion Simple OK");
23 ok
($status= ModSuggestion
( {STATUS
=>'STALLED', suggestionid
=>$suggestionid} ), "ModSuggestion Status OK");
24 ok
($status= ModSuggestion
( {suggestionid
=> $suggestionid, biblionumber
=> $biblionumber } ), "ModSuggestion, set biblionumber OK" );
25 ok
($suggestion= GetSuggestionFromBiblionumber
( $biblionumber ), "GetSuggestionFromBiblionumber OK");
26 ok
($suggestion= GetSuggestionInfoFromBiblionumber
( $biblionumber ), "GetSuggestionInfoFromBiblionumber OK");
27 ok
(@
{SearchSuggestion
( {STATUS
=>'STALLED'} )}>0, "SearchSuggestion Status OK");