Merge remote-tracking branch 'origin/new/bug_5327'

This commit is contained in:
Paul Poulain 2011-12-15 13:53:39 +01:00
commit 6ca007a923
2 changed files with 16 additions and 3 deletions

View file

@ -2,7 +2,7 @@
use strict; use strict;
use warnings; use warnings;
use Test::More tests => 12; use Test::More tests => 13;
BEGIN { use_ok( 'C4::Boolean', qw( true_p ) ); } BEGIN { use_ok( 'C4::Boolean', qw( true_p ) ); }

View file

@ -6,11 +6,24 @@
use strict; use strict;
use warnings; use warnings;
use Test::More tests => 1; use Test::More tests => 4;
BEGIN { BEGIN {
use FindBin; use FindBin;
use lib "$FindBin::Bin/../C4/SIP"; use lib "$FindBin::Bin/../C4/SIP";
use_ok('C4::SIP::ILS'); use_ok('C4::SIP::ILS');
} };
my $transaction = ILS::Transaction::RenewAll->new();
$transaction->patron(my $patron = ILS::Patron->new(23529000120056));
ok(defined $patron, "patron code: 23529000120056 is valid");
my $transaction2 = ILS::Transaction::RenewAll->new();
$transaction2->patron(my $patron2 = ILS::Patron->new("ABCDE12345"));
#This test assumes that the patron code ABCDE12345 is invalid
ok(!defined $patron2, "patron code: ABCDE12345 is invalid");
ok($transaction->do_renew_all(), "items renewed correctly");