Koha-clms/t/db_dependent/Template/Plugin
Tomas Cohen Arazi fdea245e99 Bug 23185: ->update can only be called on instantiated classes
Since our use ok Koha::Objects, there's been an implicit instantiation
happening in ->search that has somehow hidden the fact that classes need
instantiation...

This change in ->delete and ->update made it clear because of the
failures/hangs on the tests.

This patch instantiates Koha::Patron::Categories before attempting to
call ->update.

The original patches for this bug are correct and the only issue here is
that we need to document better than for some methods, instantiation is
not implicit and is required first. This is awkward and I would prefer
to force everyone to call ->new first. But I understand it would be
inconvenient.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Template/Plugin/Categories.t
=> FAIL: Notice it hangs, Ctrl+c to abort
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests dong hang, and in fact pass
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-05-07 18:05:29 -03:00
..
AuthorisedValues.t Bug 21503: Restore existing ternary operator logic 2020-03-24 11:30:08 +00:00
Branches.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Categories.t Bug 23185: ->update can only be called on instantiated classes 2020-05-07 18:05:29 -03:00
KohaDates.t Bug 21824: Add KohaDates method 'output_preference' to make it easy to store formatted dates in TT variable 2019-11-01 08:52:09 +00:00
To.t
…