[Bug 12470] New: C4::Circulations.pm needs more unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bug ID: 12470 Summary: C4::Circulations.pm needs more unit tests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: yohann.dufour@biblibre.com QA Contact: gmcharlt@gmail.com The routines CheckValidBarcode and CheckIfIssuedPatron are not tested. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|chris@bigballofwax.co.nz |yohann.dufour@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 --- Comment #1 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29189 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29189&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 --- Comment #3 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29321 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29321&action=edit Bug 12470: Allow execution of UTs on a DB with items -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |bgkriegel@gmail.com --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 --- Comment #5 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29577 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29577&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29189|0 |1 is obsolete| | --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 29589 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29589&action=edit [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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29321|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29577|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29589|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29647 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29647&action=edit [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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Yohann! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12470 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.2. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org