Bug 9532: add regression test

To test:

[1] Run prove -v t/db_dependent/Holds.t.  The last test
    should fail.
[2] Apply the main patch.
[3] Run step 1 again.  This time the tests should all pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9532: fix reservability check when bib-level item types are in use

When itemtype is defined on biblio (item-level_itypes syspref), the
method C4::Reserves::CanItemBeReserved uses item->{itemtype}. But
ithe item comes from C4::Items::GetItem and it does not have an
'itemtype' key; in this method the item type value is always in
'itype' key.

This patch corrects it.

Test plan:

You should have itemtype on biblio and 'item-level_itypes' syspref
set to biblio.

This test plan is with ReservesControlBranch on ItemHomeLibrary.
- Choose a branch, a borrower category and an item type, for example
  'NYC', 'CHILD' and 'DVD'
- Set an issuing rule for 'NYC', CHILD' and 'DVD' with 'Holds allowed'
  set to 10
- Set an issuing rule for 'NYC', CHILD' and all item types with
  'Holds allowed' set to 0
- Choose an item of a biblio with itemtype 'DVD', that can be reserved,
  with 'NYC' as homebranch
- Choose a borrower with category 'CHILD'
- Try to request the item for the borrower
=> without the patch, you can
=> with the patch, you can't
You may check reserve is allowed with 'Holds allowed' > 0 on issuing
rule for 'DVD'.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Great test plan - thanks!

Confirmed the bug, and the fix. Looks good to me.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>