[Bug 10270] New: GetOrdersByBiblionumber needs better unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Bug ID: 10270 Summary: GetOrdersByBiblionumber needs better unit tests Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7593 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18185 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18185&action=edit Bug 10270: GetOrdersByBiblionumber needs better unit tests prove t/db_dependent/Acquisition/GetOrdersByBiblionumber.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.12 Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18185|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18186 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18186&action=edit Bug 10270: GetOrdersByBiblionumber needs better unit tests prove t/db_dependent/Acquisition/GetOrdersByBiblionumber.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r --- Comment #3 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Thank you Jonathan, that looks GREAT! I am going to test it right now. Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- I made 2 tests : $prove -v t/db_dependent/Acquisition/GetOrdersByBiblionumber.t t/db_dependent/Acquisition/GetOrdersByBiblionumber.t .. ok 1 - GetOrdersByBiblionumber : no argument, return undef ok 2 - 1 order on biblionumber 1 ok 3 - 2 orders on biblionumber 2 1..3 ok All tests successful. Files=1, Tests=3, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.36 cusr 0.03 csys = 0.41 CPU) Result: PASS and $prove -v t/db_dependent/Acquisition.t t/db_dependent/Acquisition.t .. 1..37 [...] All tests successful. Files=1, Tests=37, 1 wallclock secs ( 0.01 usr 0.01 sys + 0.36 cusr 0.04 csys = 0.42 CPU) Result: PASS I sign off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18186|0 |1 is obsolete| | --- Comment #5 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 18188 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18188&action=edit [SIGNED OFF][PATCH] Bug 10270: GetOrdersByBiblionumber needs better unit tests -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18188|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18192 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18192&action=edit Bug 10270: GetOrdersByBiblionumber needs better unit tests prove t/db_dependent/Acquisition/GetOrdersByBiblionumber.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- typo in the last patch: -use C4::Biblio qw( AddBiblio ); +use C4::Biblio; [...] -( undef, $ordernumber2 ) = C4::Acquisition::NewOrder( +( undef, $ordernumber3 ) = C4::Acquisition::NewOrder( -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #8 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- However, it worked. Need to be tested again? Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Needs SO -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10274 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18192|0 |1 is obsolete| | --- Comment #10 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Created attachment 18202 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18202&action=edit [SIGNED OFF][PATCH] Bug 10270: GetOrdersByBiblionumber needs better unit tests Tested again. The 2 test files Acquisition/GetOrdersByBiblionumber.t and Acquisition.t are successful. Mathieu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 mathieu saby <mathieu.saby@univ-rennes2.fr> 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=10270 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #11 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Jonathan, a question about: +++ b/t/db_dependent/Acquisition/GetOrdersByBiblionumber.t @@ -0,0 +1,84 @@ +#!/usr/bin/env perl Why use env perl instead of perl? Note that we only use env perl in 6 Koha files (2 in the test directory t). I understand that it is more portable. But then we should do it more often.. All our scripts contain the fixed perl path. Just for consistency. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #11)
Jonathan, a question about:
+++ b/t/db_dependent/Acquisition/GetOrdersByBiblionumber.t @@ -0,0 +1,84 @@ +#!/usr/bin/env perl
Why use env perl instead of perl? Note that we only use env perl in 6 Koha files (2 in the test directory t). I understand that it is more portable. But then we should do it more often.. All our scripts contain the fixed perl path. Just for consistency.
There is no specific reason, I thought it is a good practice. A patch coming... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18204 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18204&action=edit Bug 10270: Fix shebang Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=10270 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18202|0 |1 is obsolete| | Attachment #18204|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 18222 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18222&action=edit [PASSED QA] Bug 10270: GetOrdersByBiblionumber needs better unit tests prove t/db_dependent/Acquisition/GetOrdersByBiblionumber.t Signed-off-by:Mathieu Saby <mathieu.saby@univ-rennes2.fr> I made 2 tests : $prove -v t/db_dependent/Acquisition/GetOrdersByBiblionumber.t and $prove -v t/db_dependent/Acquisition.t The 2 tests are successful. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 18223 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18223&action=edit [PASSED QA] Bug 10270: Fix shebang Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master and 3.12.x. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10270 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |10575 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org