The AddReserve routine had resdate and expdate added in between arguments (not appended) in 2009/2010ish and http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=C4/Reserves.pm;hb=b7e35a37256054c2a1d07a4fcd965283aa91968e so we need to adjust the t/db_dependent/Reserve.t accordingly.
Created attachment 11983 [details] [review] adjust-Reserves.t-test-for-resdate-and-expdate-and-t.patch This patch adds the resdate and expdate argument to the AddReserve test. I also adjusted it to create a bilio, and item for that biblio and delete them at the end of the test, so its not dependent on external test data. It gets rid of Illegal metric data warning from misaligned arguments. TestPlan: koha@biblio:~/kohaclone$ prove t/db_dependent/Reserves.t t/db_dependent/Reserves.t .. 1/4 # # Creating biblio instance for testing. # Creating item instance for testing. # Deleting item testing instance. # Deleting biblio testing instance. t/db_dependent/Reserves.t .. ok All tests successful. Files=1, Tests=4, 2 wallclock secs ( 0.03 usr 0.01 sys + 0.59 cusr 0.04 csys = 0.67 CPU) Result: PASS
Created attachment 12031 [details] [review] Bug 8728 : Adjust Reserves.t test for resdate and expdate and test setup/teardown Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Works better now, creats biblio records, and cleans up after itself as well.
QA comment: * 0 side-effect risk (unit test only) * koha-qa.pl irrelevent * looking at the code, nothing to say I can't test it on my sandbox because it's MAR21 and my demo is UNIMARC. Thus creating the test record badly fail: substr outside of string at /usr/share/perl5/MARC/File/XML.pm line 498. Use of uninitialized value $enc in string eq at /usr/share/perl5/MARC/File/XML.pm line 500. Use of uninitialized value $enc in string eq at /usr/share/perl5/MARC/File/XML.pm line 500. Use of uninitialized value $enc in string eq at /usr/share/perl5/MARC/File/XML.pm line 502. Use of uninitialized value $enc in concatenation (.) or string at /usr/share/perl5/MARC/File/XML.pm line 505. Unsupported UNIMARC character encoding [] for XML output for UNIMARC; 100$a -> Moffat, Steven at /usr/share/perl5/MARC/File/XML.pm line 505. Passed QA
Patch pushed to master