Koha/t/db_dependent/Suggestions.t
Jonathan Druart 0200639b00 Bug 5346: Linking suggestions and orders.
Display suggestion info in acquisition module:
  basket.pl
  neworderempty.pl
  orderreceive.pl
  parcel.pl

To Test:
Create a suggestion and accept it.
Create a new order from this suggestion
Receive this order

For each step, check if suggestion info are visible.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test provides more unit tests, all complete successfully.
perl t/db_dependent/Suggestions.t
Note: test case should be cleaned up after running tests.

Display changes are consistent and information about the suggestion
is shown on every important screen now.

I created an order from a suggestion and one from an existing record.

No problems found.
2012-02-17 10:27:52 +01:00

28 lines
1.1 KiB
Perl

#!/usr/bin/perl
#
# This Koha test module is a stub!
# Add more tests here!!!
use strict;
use warnings;
use Data::Dumper;
use C4::Suggestions;
use Test::More tests =>9;
BEGIN {
use_ok('C4::Suggestions');
}
my ($suggestionid, $suggestion, $status, $biblionumber);
$biblionumber = 1;
ok($suggestionid= NewSuggestion( {title=>'Petit traité de philosohpie',author=>'Hubert de Chardassé',publishercode=>'Albin Michel'} ), "NewSuggestion OK");
ok($suggestion= GetSuggestion( $suggestionid), "GetSuggestion OK");
ok($status= ModSuggestion( {title=>'test Modif Simple', suggestionid=>$suggestionid} ), "ModSuggestion Simple OK");
ok($status= ModSuggestion( {STATUS=>'STALLED', suggestionid=>$suggestionid} ), "ModSuggestion Status OK");
ok($status= ModSuggestion( {suggestionid => $suggestionid, biblionumber => $biblionumber } ), "ModSuggestion, set biblionumber OK" );
ok($suggestion= GetSuggestionFromBiblionumber( $biblionumber ), "GetSuggestionFromBiblionumber OK");
ok($suggestion= GetSuggestionInfoFromBiblionumber( $biblionumber ), "GetSuggestionInfoFromBiblionumber OK");
ok(@{SearchSuggestion( {STATUS=>'STALLED'} )}>0, "SearchSuggestion Status OK");