Browse Source

Bug 26132: (follow-up) Add test to show errors in max issues amount calculation

If you set default branch limits for issue quantity circulation
rules you will get errors when calling TooMany function.

To reproduce the error:
1) Apply this patch
2) Run prove t/db_dependent/Circulation/TooMany.t and notice the
   following error:

No method count found for Koha::Checkouts DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'item.homebranch' in 'where clause' [...]

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Joonas Kylmälä 11 months ago
committed by Jonathan Druart
parent
commit
fe7abf020c
  1. 12
      t/db_dependent/Circulation/TooMany.t

12
t/db_dependent/Circulation/TooMany.t

@ -505,6 +505,18 @@ subtest 'General vs specific rules limit quantity correctly' => sub {
}
);
# Set default maximum issue quantity limits for branch
Koha::CirculationRules->set_rules(
{
branchcode => $branch->{branchcode},
categorycode => '*',
rules => {
patron_maxissueqty => 1,
patron_maxonsiteissueqty => 1,
}
}
);
# Set an All->All for an itemtype
Koha::CirculationRules->set_rules(
{

Loading…
Cancel
Save