https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43948

--- Comment #16 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 212016
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212016&action=edit
Bug 43948: (RM follow-up) Test the item type that gives the default replacement
cost

The tests of effective_replacement_price mocked item-level_itypes to 1
only and built an item whose item type and biblio item type could
coincide, so nothing showed that the default comes from the effective
item type. Add the cases that were missing:

* item-level_itypes on: the default of the item type of the item is used
  when it differs from the one of its biblio
* item-level_itypes off: the default of the item type of the biblio is
  used
* an item type default of 0 gives 0
* a price on the item is used when useDefaultReplacementCost is off

To test:
1. prove t/db_dependent/Koha/Item.t
   => All tests pass
2. Make effective_replacement_price use the item type of the item
   whatever item-level_itypes says, for instance by replacing
   $self->itemtype with Koha::ItemTypes->find( $self->itype )
   => The test for item-level_itypes off fails

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to