Bug 3638 Self Check Should Capture Hold Items
[koha.git] / C4 / SIP / t / 11item_info.t
1 #!/usr/bin/perl
2 # Item Information test
3
4 use strict;
5 use warnings;
6 use Clone qw(clone);
7
8 use Sip::Constants qw(:all);
9 use SIPtest qw(:basic :user1 :item1);
10
11 my $item_info_test_template = {
12         id  => "Item Information: check info for available item ($item_barcode)",
13         msg => "1720060110    215612AO$instid|AB$item_barcode|",
14         pat => qr/^180[13]0201$datepat/, # status of 'other' or 'available'
15         fields => [
16                 $SIPtest::field_specs{(FID_SCREEN_MSG)},
17                 $SIPtest::field_specs{(FID_PRINT_LINE)},
18                 { field    => FID_ITEM_ID,
19                   pat      => qr/^$item_barcode$/,
20                   required => 1, },
21                 { field    => FID_TITLE_ID,
22                   pat      => qr/^$item_title\s*$/,
23                   required => 1, },
24                 { field    => FID_MEDIA_TYPE,
25                   pat      => qr/^\d{3}$/,
26                   required => 0, },
27                 { field    => FID_OWNER,
28                   pat      => qr/^$item_owner$/,
29                   required => 0, },
30         ],
31 };
32
33 my @tests = (
34         $SIPtest::login_test,
35         $SIPtest::sc_status_test,
36         $item_info_test_template,
37 );
38
39 SIPtest::run_sip_tests(@tests);
40
41 1;