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

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #189494|0                           |1
        is obsolete|                            |

--- Comment #14 from Marcel de Rooy <[email protected]> ---
Created attachment 191692
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191692&action=edit
Bug 41237: Add tests

Test plan, k-t-d:
1) Apply tests patch, run:
prove t/db_dependent/Koha/ILL/Requests.t
2) Notice it fails. Apply the second patch. Repeat. Notice it passes.

Test failure explanation (before fix patch):
    #   Failed test 'Cardnumber not supplied and couldnt find
additional_contents for all libraries. Dont show copyrightclearance'
    #   at t/db_dependent/Koha/ILL/Requests.t line 1067.
    #          got: 'copyrightclearance'
    #     expected: 'commit'

Its searching the copyrightclearance additional_contents for the provided
branchcode param (illrq->patron->branchcode) (and finding one) when it
shouldn't. That parameter is only to be utilized for the newly created ILL
request's library. The branchcode filter of the additional_contents must the be
logged in user's cardnumber, not params->{branchcode}. If no logged in user
exists and this stage is reached (ILLOpacUnauthenticatedRequest), then only
'All libraries' ILLModuleCopyrightClearance are to be fetched, as expected.

Human test plan, before applying patches:
1) Enable ILLModule
2) Logged in as koha:koha, create an OPAC request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Pick any library not Centerville (the default library of the 'koha' user)
4) Notice the created request's library is CPL (Centerville). It ignored the
library selection from the form.
5) Apply patches. Repeat. Notice the request's library is now the one that was
selected on the form.

Signed-off-by: Stephen Graham <[email protected]>

Signed-off-by: Marcel de Rooy <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to