|
Lines 6-16
Link Here
|
| 6 |
use strict; |
6 |
use strict; |
| 7 |
use warnings; |
7 |
use warnings; |
| 8 |
|
8 |
|
| 9 |
use Test::More tests => 1; |
9 |
use Test::More tests => 4; |
| 10 |
|
10 |
|
| 11 |
BEGIN { |
11 |
BEGIN { |
| 12 |
use FindBin; |
12 |
use FindBin; |
| 13 |
use lib "$FindBin::Bin/../C4/SIP"; |
13 |
use lib "$FindBin::Bin/../C4/SIP"; |
| 14 |
use_ok('C4::SIP::ILS'); |
14 |
use_ok('C4::SIP::ILS'); |
| 15 |
} |
15 |
}; |
| 16 |
|
16 |
|
| 17 |
- |
17 |
my $transaction = ILS::Transaction::RenewAll->new(); |
|
|
18 |
|
| 19 |
$transaction->patron(my $patron = ILS::Patron->new(23529000120056)); |
| 20 |
|
| 21 |
ok(defined $patron, "patron code: 23529000120056 is valid"); |
| 22 |
|
| 23 |
my $transaction2 = ILS::Transaction::RenewAll->new(); |
| 24 |
$transaction2->patron(my $patron2 = ILS::Patron->new("ABCDE12345")); |
| 25 |
|
| 26 |
#This test assumes that the patron code ABCDE12345 is invalid |
| 27 |
ok(!defined $patron2, "patron code: ABCDE12345 is invalid"); |
| 28 |
|
| 29 |
ok($transaction->do_renew_all(), "items renewed correctly"); |