[Koha-bugs] [Bug 23843] Make existing endpoints use Koha::Object(s)->to_api

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 21 20:23:23 CEST 2019


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

--- Comment #10 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 94496
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94496&action=edit
Bug 23843: (QA follow-up) Fix tests for funds

Now that we use ->to_api all the object attributes are returned, so the
original tests that didn't follow the FKs would pass, and now they
don't. If there is no budget linked to the fund, it will return undef,
which is not accepted on the API (though it accepts not returning the
attribute).

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_funds.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list