The module Koha::Borrower::Files.pm is not tested
Created attachment 28864 [details] [review] Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm The module Koha::Borrower::Files.pm was not tested To test: 1/ Execute the command: prove t/db_dependent/Borrower_Files.t 2/ The command has to print: t/db_dependent/Borrower_Files.t .. ok All tests successful. Files=1, Tests=23, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.47 cusr 0.08 csys = 1.60 CPU) Result: PASS
Created attachment 29152 [details] [review] [SIGNED-OFF] Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm The module Koha::Borrower::Files.pm was not tested To test: 1/ Execute the command: prove t/db_dependent/Borrower_Files.t 2/ The command has to print: t/db_dependent/Borrower_Files.t .. ok All tests successful. Files=1, Tests=23, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.47 cusr 0.08 csys = 1.60 CPU) Result: PASS Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> New test file, all test pass No koha-qa errors
The tests fail for me, because I have borrowers with issues in my database I think: ok 1 - use Koha::Borrower::Files; DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha`.`issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON UPDATE CASCADE) at t/db_dependent/Borrower_Files.t line 33. DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha`.`issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON UPDATE CASCADE) at t/db_dependent/Borrower_Files.t line 33. Maybe the tests can be improved a bit to make this not a problem?
Created attachment 29188 [details] [review] Bug 12417: Allow execution of UTs on a DB with issues
Created attachment 29588 [details] [review] [SIGNED-OFF] Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm The module Koha::Borrower::Files.pm was not tested To test: 1/ Execute the command: prove t/db_dependent/Borrower_Files.t 2/ The command has to print: t/db_dependent/Borrower_Files.t .. ok All tests successful. Files=1, Tests=23, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.47 cusr 0.08 csys = 1.60 CPU) Result: PASS Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Squashed patches. Now test pass No koha-qa errors
Created attachment 29645 [details] [review] [PASSED QA] Bug 12417: adding the units tests of the module Koha::Borrower::Files.pm The module Koha::Borrower::Files.pm was not tested To test: 1/ Execute the command: prove t/db_dependent/Borrower_Files.t 2/ The command has to print: t/db_dependent/Borrower_Files.t .. ok All tests successful. Files=1, Tests=23, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.47 cusr 0.08 csys = 1.60 CPU) Result: PASS Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Squashed patches. Now test pass No koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Yohann!
Pushed to 3.16.x for inclusion in 3.16.2.