Bug 9032: add ability to invite another to share a private list
[koha.git] / t / db_dependent / Suggestions.t
blobf285929739b92e1bb140ef25f60b56ca78fdaa41
1 #!/usr/bin/perl
3 # This Koha test module is a stub!
4 # Add more tests here!!!
6 use strict;
7 use warnings;
8 use Data::Dumper;
10 use C4::Suggestions;
12 use Test::More tests =>9;
14 BEGIN {
15 use_ok('C4::Suggestions');
18 my ($suggestionid, $suggestion, $status, $biblionumber);
19 $biblionumber = 1;
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");