Lines 911-917
subtest checkin_withdrawn => sub {
Link Here
|
911 |
}; |
911 |
}; |
912 |
|
912 |
|
913 |
subtest _get_sort_bin => sub { |
913 |
subtest _get_sort_bin => sub { |
914 |
plan tests => 4; |
914 |
plan tests => 5; |
915 |
|
915 |
|
916 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
916 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
917 |
my $branch = $library->branchcode; |
917 |
my $branch = $library->branchcode; |
Lines 927-932
$branch:itemcallnumber:<:600:3\r
Link Here
|
927 |
$branch2:homebranch:ne:\$holdingbranch:X\r |
927 |
$branch2:homebranch:ne:\$holdingbranch:X\r |
928 |
$branch2:effective_itemtype:eq:CD:4\r |
928 |
$branch2:effective_itemtype:eq:CD:4\r |
929 |
$branch2:itemcallnumber:>:600:5\r |
929 |
$branch2:itemcallnumber:>:600:5\r |
|
|
930 |
$branch2:effective_itemtype:eq:BOOK:ccode:eq:TEEN:6\r |
930 |
RULES |
931 |
RULES |
931 |
t::lib::Mocks::mock_preference('SIP2SortBinMapping', $rules); |
932 |
t::lib::Mocks::mock_preference('SIP2SortBinMapping', $rules); |
932 |
|
933 |
|
Lines 945-950
RULES
Link Here
|
945 |
} |
946 |
} |
946 |
); |
947 |
); |
947 |
|
948 |
|
|
|
949 |
my $item_book2 = $builder->build_sample_item( |
950 |
{ |
951 |
library => $library2->branchcode, |
952 |
itype => 'BOOK', |
953 |
ccode => 'TEEN' |
954 |
} |
955 |
); |
956 |
|
948 |
my $bin; |
957 |
my $bin; |
949 |
|
958 |
|
950 |
# Set holdingbranch as though item returned to library other than homebranch (As AddReturn would) |
959 |
# Set holdingbranch as though item returned to library other than homebranch (As AddReturn would) |
Lines 961-966
RULES
Link Here
|
961 |
$item_book->itemcallnumber('350.20')->store(); |
970 |
$item_book->itemcallnumber('350.20')->store(); |
962 |
$bin = C4::SIP::ILS::Transaction::Checkin::_get_sort_bin( $item_book, $library->branchcode ); |
971 |
$bin = C4::SIP::ILS::Transaction::Checkin::_get_sort_bin( $item_book, $library->branchcode ); |
963 |
is($bin, '2', "Rules applied in order (< comparator)"); |
972 |
is($bin, '2', "Rules applied in order (< comparator)"); |
|
|
973 |
|
974 |
$bin = C4::SIP::ILS::Transaction::Checkin::_get_sort_bin( $item_book2, $library2->branchcode ); |
975 |
is($bin, '6', "Rules with multiple field matches"); |
964 |
}; |
976 |
}; |
965 |
|
977 |
|
966 |
subtest item_circulation_status => sub { |
978 |
subtest item_circulation_status => sub { |
967 |
- |
|
|