Bug 23634: (QA follow-up) Our PUT is really a PATCH
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 13 Jul 2020 15:25:13 +0000 (12:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 2 Sep 2020 13:40:55 +0000 (15:40 +0200)
commitbc97867dfc9a9553be700403746ec09864234366
treef644f31f0af6147f694ebf49b1a5a620e8f45378
parent1a5cf89eb5d72679b693dea1928760e5dc27816a
Bug 23634: (QA follow-up) Our PUT is really a PATCH

This patch makes the controller not expect that there will always be all
the email fields. So it now checks if an email field was passed, and
changed, and renders the error if that stands.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Tests written by Nick highlight a problem
2. Apply this patch
3. Repeat 1
=> SUCCESS: Problems solved
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Patrons.pm