Description
Yohann Dufour
2014-06-24 09:24:54 UTC
Created attachment 29189 [details] [review] Bug 12470: adding unit tests for the routines CheckValidBarCode and CheckIfIssuedToPatron of the module C4::Circulation.pm The routines CheckValidBarcode and CheckIfIssuedToPatron were not tested Test plan: 1/ Apply the patch 2/ Execute : prove t/db_dependent/Circulation/CheckValidBarcode.t t/db_dependent/Circulation/CheckIfIssuedToPatron.t 3/ The result of the command has to be a success without error or warning : t/db_dependent/Circulation/CheckValidBarcode.t ...... ok t/db_dependent/Circulation/CheckIfIssuedToPatron.t .. ok All tests successful. Files=2, Tests=32, 3 wallclock secs ( 0.04 usr 0.01 sys + 2.88 cusr 0.17 csys = 3.10 CPU) Result: PASS DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_test`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at t/db_dependent/Circulation/CheckIfIssuedToPatron.t line 26. DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_test`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at t/db_dependent/Circulation/CheckIfIssuedToPatron.t line 26. Created attachment 29321 [details] [review] Bug 12470: Allow execution of UTs on a DB with items Yohann, you need to swap this two lines on the two files. $dbh->do(q|DELETE FROM items|); $dbh->do(q|DELETE FROM issues|); Both tests fails. Created attachment 29577 [details] [review] Bug 12470: Allow execution of UTs on a DB with items (fix the order) Fix of the order of the removal of items and issues Hi Yohan, ready to be signed, works well :) But... can you squash and resubmit? Or add your fixes to first patch and obsolete last two. Created attachment 29589 [details] [review] [SIGNED-OFF] Bug 12470: adding unit tests for the routines CheckValidBarCode and CheckIfIssuedToPatron of the module C4::Circulation.pm The routines CheckValidBarcode and CheckIfIssuedToPatron were not tested Test plan: 1/ Apply the patch 2/ Execute : prove t/db_dependent/Circulation/CheckValidBarcode.t t/db_dependent/Circulation/CheckIfIssuedToPatron.t 3/ The result of the command has to be a success without error or warning : t/db_dependent/Circulation/CheckValidBarcode.t ...... ok t/db_dependent/Circulation/CheckIfIssuedToPatron.t .. ok All tests successful. Files=2, Tests=32, 3 wallclock secs ( 0.04 usr 0.01 sys + 2.88 cusr 0.17 csys = 3.10 CPU) Result: PASS Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Patches squashed Tests pass, no koha-qa errors Created attachment 29647 [details] [review] [PASSED QA] Bug 12470: adding unit tests for the routines CheckValidBarCode and CheckIfIssuedToPatron of the module C4::Circulation.pm The routines CheckValidBarcode and CheckIfIssuedToPatron were not tested Test plan: 1/ Apply the patch 2/ Execute : prove t/db_dependent/Circulation/CheckValidBarcode.t t/db_dependent/Circulation/CheckIfIssuedToPatron.t 3/ The result of the command has to be a success without error or warning : t/db_dependent/Circulation/CheckValidBarcode.t ...... ok t/db_dependent/Circulation/CheckIfIssuedToPatron.t .. ok All tests successful. Files=2, Tests=32, 3 wallclock secs ( 0.04 usr 0.01 sys + 2.88 cusr 0.17 csys = 3.10 CPU) Result: PASS Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Patches squashed Tests pass, no koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Tests pass using sample data provided with Koha Patch pushed to master. Thanks Yohann! Pushed to 3.16.x for inclusion in 3.16.2. |