View | Details | Raw Unified | Return to bug 9845
Collapse All | Expand All

(-)a/C4/SIP/t/08checkin.t (-10 / +25 lines)
Lines 8-17 use Clone qw(clone); Link Here
8
use Sip::Constants qw(:all);
8
use Sip::Constants qw(:all);
9
use SIPtest qw(:basic :user1 :item1);
9
use SIPtest qw(:basic :user1 :item1);
10
10
11
# Checkout response, format:
12
# code: 12
13
# success: 0 or 1
14
# renewal ok: Y or N
15
# magnetic media: Y, N or U
16
# desensitize: Y or N
17
# date
18
19
# Checkin response, format:
20
# code: 10
21
# success: 0 or 1
22
# resensitize: Y or N
23
# magnetic media: Y, N or U
24
# alert: Y or N
25
# date
26
27
my $checkout_template = {
28
    id  => "Checkin: prep: check out item ($item_barcode)",
29
    msg => "11YN20060329    203000                  AO$instid|AA$user_barcode|AB$item_barcode|AC|",
30
    pat => qr/^121N[NYU][NY]$datepat/,
31
    fields => [],
32
};
33
11
my $checkin_test_template = {
34
my $checkin_test_template = {
12
    id  => "Checkin: Item ($item_barcode) is checked out",
35
    id  => "Checkin: Item ($item_barcode) is checked out",
13
    msg => "09N20060102    08423620060113    084235AP$item_owner|AO$instid|AB$item_barcode|AC$password|",
36
    msg => "09N20060102    08423620060113    084235AP$item_owner|AO$instid|AB$item_barcode|AC$password|",
14
    pat => qr/^101YNN$datepat/,
37
    pat => qr/^101[NY][NYU]N$datepat/,
15
    fields => [
38
    fields => [
16
        $SIPtest::field_specs{(FID_INST_ID   )},
39
        $SIPtest::field_specs{(FID_INST_ID   )},
17
        $SIPtest::field_specs{(FID_SCREEN_MSG)},
40
        $SIPtest::field_specs{(FID_SCREEN_MSG)},
Lines 33-45 my $checkin_test_template = { Link Here
33
          required => 0, }, # 3M Extension
56
          required => 0, }, # 3M Extension
34
   ],};
57
   ],};
35
58
36
my $checkout_template = {
37
    id  => "Checkin: prep: check out item ($item_barcode)",
38
    msg => "11YN20060329    203000                  AO$instid|AA$user_barcode|AB$item_barcode|AC|",
39
    pat => qr/^121NNY$datepat/,
40
    fields => [],
41
};
42
43
my @tests = (
59
my @tests = (
44
	$SIPtest::login_test,
60
	$SIPtest::login_test,
45
	$SIPtest::sc_status_test,
61
	$SIPtest::sc_status_test,
Lines 54-60 my $test; Link Here
54
# the ILS didn't check the item in, and there's no patron id.
70
# the ILS didn't check the item in, and there's no patron id.
55
$test = clone($checkin_test_template);
71
$test = clone($checkin_test_template);
56
$test->{id}  = 'Checkin: Item not checked out';
72
$test->{id}  = 'Checkin: Item not checked out';
57
$test->{pat} = qr/^100YNN$datepat/o;
73
$test->{pat} = qr/^100[NY][NYU][NY]$datepat/o;
58
$test->{fields} = [grep $_->{field} ne FID_PATRON_ID, @{$test->{fields}}];
74
$test->{fields} = [grep $_->{field} ne FID_PATRON_ID, @{$test->{fields}}];
59
75
60
push @tests, $test;
76
push @tests, $test;
61
- 

Return to bug 9845