[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Bernardo Gonzalez Kriegel changed: What|Removed |Added CC||bgkrie...@gmail.com --- Comment #25 from Bernardo Gonzalez Kriegel --- Pushed to 3.10.x, will be in 3.10.12 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Tomás Cohen Arazi changed: What|Removed |Added Status|Pushed to Master|Pushed to Stable CC||tomasco...@gmail.com --- Comment #24 from Tomás Cohen Arazi --- This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Kenza! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Tomás Cohen Arazi changed: What|Removed |Added Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Galen Charlton changed: What|Removed |Added Status|Passed QA |Pushed to Master --- Comment #23 from Galen Charlton --- Pushed to master. Thanks, Kenza! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Katrin Fischer changed: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Katrin Fischer changed: What|Removed |Added Attachment #19953|0 |1 is obsolete|| --- Comment #22 from Katrin Fischer --- Created attachment 20585 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20585&action=edit [PASSED QA] C4::Bookseller.pm need unit tests The tests are wrap in a transaction. NOTE: some tests should pass but doesn't because of incoherences in the code. These tests are in comments and preceded by FIXME Test plan: prove t/db_dependent/Bookseller.t t/db_dependent/Bookseller.t .. 15/53 [Some warnings about uninitialised values] t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=53, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.46 cusr 0.03 csys = 0.51 CPU) Result: PASS http://bugs.koha-community.org/show_bug.cgi?id=10528 Signed-off-by: Srdjan Signed-off-by: Katrin Fischer The new tests pass nicely, as do all old tests and the QA script. All patches marked as dependencies have been pushed to master already. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Katrin Fischer changed: What|Removed |Added CC||katrin.fisc...@bsz-bw.de --- Comment #21 from Katrin Fischer --- All the tests pass nicely, but there are a lot of warnings when you run the test with prove: Use of uninitialized value $calculated in substitution (s///) at /home/katrin/kohaclone/C4/Serials.pm line 985. Use of uninitialized value $pattern in numeric eq (==) at /home/katrin/kohaclone/C4/Serials.pm line 988. Maybe something for another bug? :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Srdjan Jankovic changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Srdjan Jankovic changed: What|Removed |Added Attachment #19874|0 |1 is obsolete|| --- Comment #20 from Srdjan Jankovic --- Created attachment 19953 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19953&action=edit [SIGNED-OFF] C4::Bookseller.pm need unit tests The tests are wrap in a transaction. NOTE: some tests should pass but doesn't because of incoherences in the code. These tests are in comments and preceded by FIXME Test plan: prove t/db_dependent/Bookseller.t t/db_dependent/Bookseller.t .. 15/53 [Some warnings about uninitialised values] t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=53, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.46 cusr 0.03 csys = 0.51 CPU) Result: PASS http://bugs.koha-community.org/show_bug.cgi?id=10528 Signed-off-by: Srdjan -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #19 from kenza --- (In reply to Srdjan Jankovic from comment #18) > Tests passed, however I got > Use of uninitialized value $calculated in substitution (s///) at > C4/Serials.pm line 988. > Use of uninitialized value $pattern in numeric eq (==) at C4/Serials.pm line > 991. > Use of uninitialized value $calculated in substitution (s///) at > C4/Serials.pm line 1000. > Use of uninitialized value $calculated in substitution (s///) at > C4/Serials.pm line 1003. > Use of uninitialized value $serialseq in string at C4/Serials.pm line 1391. > > Do I need any data from that infamous patch? No , these warnings are normal, the initialization of these values is useless for this patch. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Blocks||10641 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Blocks||10640 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #18 from Srdjan Jankovic --- Tests passed, however I got Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 988. Use of uninitialized value $pattern in numeric eq (==) at C4/Serials.pm line 991. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1000. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1003. Use of uninitialized value $serialseq in string at C4/Serials.pm line 1391. Do I need any data from that infamous patch? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #17 from kenza --- (In reply to Srdjan Jankovic from comment #16) > Ok, then it the first patch is FAILED QA, it should be replaced with > something? Yes, by the last patch. I put the first on as obsolete. Now it should work... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Attachment #19855|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #16 from Srdjan Jankovic --- Ok, then it the first patch is FAILED QA, it should be replaced with something? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #15 from kenza --- (In reply to Srdjan Jankovic from comment #14) > This won't work. Since the first patch is PASSED QA, I suggest the unit test > patch is rebased to the first patch. But the first patch is FAILED QA... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #14 from Srdjan Jankovic --- This won't work. Since the first patch is PASSED QA, I suggest the unit test patch is rebased to the first patch. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #12 from kenza --- (In reply to Galen Charlton from comment #11) > I have reservations about this patch. Adding more unit tests is a good > thing, obviously, and the proposed changes to functions in C4::Booksellers > may be good things. However, they don't belong squashed together in a > single patch, particularly since the patch description provides no test plan > for the staff interfaces -- and if you change core routines, there ought to > be such a test plan included in the patch, even if the only thing it does is > identify the interfaces whose visible behavior is not changed. > > Please break it up, for example like this: > > [1] A patch for this bug that *only* adds additional unit tests. > [2] An additional bug for each change you propose to routines in > C4::Booksellers, along with any changes to the test script. Ok I will do that. Thanks for the advices. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Blocks||10630 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #13 from kenza --- Created attachment 19874 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19874&action=edit C4::Bookseller.pm need unit tests The tests are wrap in a transaction. NOTE: some tests should pass but doesn't because of incoherences in the code. These tests are in comments and preceded by FIXME Test plan: prove t/db_dependent/Bookseller.t t/db_dependent/Bookseller.t .. 15/53 [Some warnings about uninitialised values] t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=53, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.46 cusr 0.03 csys = 0.51 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Galen Charlton changed: What|Removed |Added Status|Passed QA |Failed QA CC||gmcha...@gmail.com --- Comment #11 from Galen Charlton --- I have reservations about this patch. Adding more unit tests is a good thing, obviously, and the proposed changes to functions in C4::Booksellers may be good things. However, they don't belong squashed together in a single patch, particularly since the patch description provides no test plan for the staff interfaces -- and if you change core routines, there ought to be such a test plan included in the patch, even if the only thing it does is identify the interfaces whose visible behavior is not changed. Please break it up, for example like this: [1] A patch for this bug that *only* adds additional unit tests. [2] An additional bug for each change you propose to routines in C4::Booksellers, along with any changes to the test script. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Katrin Fischer changed: What|Removed |Added Attachment #19782|0 |1 is obsolete|| --- Comment #10 from Katrin Fischer --- Created attachment 19855 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19855&action=edit [PASSED QA] Bug 10528: C4::Booksellers needs unit tests Unit tests are wrap in a database transaction. GetBooksellerWithLateOrders has been modify in order to pass the tests. Now it considers the field $estimateddeliverydateto and it replaces it by now() only if it is undef. More it doesn't test if $aqbookseller.deliverytime is not Null anymore but if $deliverytime = null or undef, it replaces it by 0. It also verifies if $delay is >= 0. ModBookseller has been modify in order to be more explicit: before it always returned undef. Now it returns : 1 -> If a modification has been done 0E0 -> If the given id doesn't exist undef -> If no id given DelBookSeller has been modify in order to be more explicit: Before it returned undef, now it returns $sth->execute($id), so we can verify how many bookSellers have been deleted. Test Plan : prove t/db_dependant/Booksellers.t t/db_dependent/Bookseller.t .. 2/67 [Some warnings about uninitialized values] WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/kenza/workspace/kohaclone/C4/Bookseller.pm line 137. t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=67, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.49 CPU) Result: PASS Signed-off-by: Srdjan Signed-off-by: Katrin Fischer Works nicely, when patch for 10557 is also applied. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Katrin Fischer 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. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Srdjan Jankovic changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Srdjan Jankovic changed: What|Removed |Added Attachment #19756|0 |1 is obsolete|| --- Comment #9 from Srdjan Jankovic --- Created attachment 19782 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19782&action=edit [SIGNED-OFF] Bug 10528: C4::Booksellers needs unit tests Unit tests are wrap in a database transaction. GetBooksellerWithLateOrders has been modify in order to pass the tests. Now it considers the field $estimateddeliverydateto and it replaces it by now() only if it is undef. More it doesn't test if $aqbookseller.deliverytime is not Null anymore but if $deliverytime = null or undef, it replaces it by 0. It also verifies if $delay is >= 0. ModBookseller has been modify in order to be more explicit: before it always returned undef. Now it returns : 1 -> If a modification has been done 0E0 -> If the given id doesn't exist undef -> If no id given DelBookSeller has been modify in order to be more explicit: Before it returned undef, now it returns $sth->execute($id), so we can verify how many bookSellers have been deleted. Test Plan : prove t/db_dependant/Booksellers.t t/db_dependent/Bookseller.t .. 2/67 [Some warnings about uninitialized values] WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/kenza/workspace/kohaclone/C4/Bookseller.pm line 137. t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=67, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.49 CPU) Result: PASS Signed-off-by: Srdjan -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #8 from kenza --- t/db_dependent/Bookseller.t has been modify. Now, it deletes all the booksellers of the database at the beginning of the transaction in order to be sure the tests pass. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Attachment #19713|0 |1 is obsolete|| --- Comment #7 from kenza --- Created attachment 19756 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19756&action=edit Bug 10528: C4::Booksellers needs unit tests Unit tests are wrap in a database transaction. GetBooksellerWithLateOrders has been modify in order to pass the tests. Now it considers the field $estimateddeliverydateto and it replaces it by now() only if it is undef. More it doesn't test if $aqbookseller.deliverytime is not Null anymore but if $deliverytime = null or undef, it replaces it by 0. It also verifies if $delay is >= 0. ModBookseller has been modify in order to be more explicit: before it always returned undef. Now it returns : 1 -> If a modification has been done 0E0 -> If the given id doesn't exist undef -> If no id given DelBookSeller has been modify in order to be more explicit: Before it returned undef, now it returns $sth->execute($id), so we can verify how many bookSellers have been deleted. Test Plan : prove t/db_dependant/Booksellers.t t/db_dependent/Bookseller.t .. 2/67 [Some warnings about uninitialized values] WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/kenza/workspace/kohaclone/C4/Bookseller.pm line 137. t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=67, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.49 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #6 from Srdjan Jankovic --- prove t/db_dependent/Bookseller.t t/db_dependent/Bookseller.t .. 1/67 # Failed test 'Returns right fields of Supplier1 and Supllier2' # at t/db_dependent/Bookseller.t line 128. # Structures begin differing at: # $got->[0]{listincgst} = '0' # $expected->[0]{listincgst} = '1' Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 988. Use of uninitialized value $pattern in numeric eq (==) at C4/Serials.pm line 991. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1000. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1003. Use of uninitialized value $serialseq in string at C4/Serials.pm line 1391. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 988. Use of uninitialized value $pattern in numeric eq (==) at C4/Serials.pm line 991. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1000. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1003. Use of uninitialized value $serialseq in string at C4/Serials.pm line 1391. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 988. Use of uninitialized value $pattern in numeric eq (==) at C4/Serials.pm line 991. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1000. Use of uninitialized value $calculated in substitution (s///) at C4/Serials.pm line 1003. Use of uninitialized value $serialseq in string at C4/Serials.pm line 1391. WARNING: GetBooksellerWithLateOrders is called with a negative value at C4/Bookseller.pm line 137. # Looks like you failed 1 test of 67. Do I need 10337 for this one too? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Attachment #19566|0 |1 is obsolete|| --- Comment #5 from kenza --- Created attachment 19713 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19713&action=edit Bug 10528: C4::Booksellers needs unit tests Unit tests are wrap in a database transaction. GetBooksellerWithLateOrders has been modify in order to pass the tests. Now it considers the field $estimateddeliverydateto and it replaces it by now() only if it is undef. More it doesn't test if $aqbookseller.deliverytime is not Null anymore but if $deliverytime = null or undef, it replaces it by 0. It also verifies if $delay is >= 0. ModBookseller has been modify in order to be more explicit: before it always returned undef. Now it returns : 1 -> If a modification has been done 0E0 -> If the given id doesn't exist undef -> If no id given DelBookSeller has been modify in order to be more explicit: Before it returned undef, now it returns $sth->execute($id), so we can verify how many bookSellers have been deleted. Test Plan : prove t/db_dependant/Booksellers.t t/db_dependent/Bookseller.t .. 2/67 [Some warnings about uninitialized values] WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/kenza/workspace/kohaclone/C4/Bookseller.pm line 137. t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=67, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.49 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #4 from Srdjan Jankovic --- Yes. 10556 should not be applied any more I guess, it has been pushed to master. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Jonathan Druart changed: What|Removed |Added CC||jonathan.dru...@biblibre.co ||m --- Comment #3 from Jonathan Druart --- (In reply to Srdjan Jankovic from comment #2) > There's something wrong with the patch: Did you applied dependent patches? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Srdjan Jankovic changed: What|Removed |Added CC||srd...@catalyst.net.nz --- Comment #2 from Srdjan Jankovic --- There's something wrong with the patch: git am --reject ~/Bug-10528-C4Booksellers-needs-unit-tests.patch Applying: Bug 10528: C4::Booksellers needs unit tests Checking patch C4/Bookseller.pm... error: while searching for: sub ModBookseller { my ($data) = @_; my $dbh= C4::Context->dbh; my $query = q| UPDATE aqbooksellers SET name = ?, address1 = ?, address2 = ?, address3 = ?, address4 = ?, error: patch failed: C4/Bookseller.pm:226 error: while searching for: ,$data->{notes},$data->{deliverytime} ,$data->{id} ); return; } =head2 DelBookseller error: patch failed: C4/Bookseller.pm:254 Checking patch t/db_dependent/Bookseller.t... /home/srdjan/koha/dev/.git/rebase-apply/patch:786: new blank line at EOF. + -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 --- Comment #1 from kenza --- Created attachment 19566 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19566&action=edit Bug 10528: C4::Booksellers needs unit tests Unit tests are wrap in a database transaction. GetBooksellerWithLateOrders has been modify in order to pass the tests. Now it considers the field $estimateddeliverydateto and it replaces it by now() only if it is undef. More it doesn't test if $aqbookseller.deliverytime is not Null anymore but if $deliverytime = null or undef, it replaces it by 0. It also verifies if $delay is >= 0. ModBookseller has been modify in order to be more explicit: before it always returned undef. Now it returns : 1 -> If a modification has been done 0E0 -> If the given id doesn't exist undef -> If no id given DelBookSeller has been modify in order to be more explicit: Before it returned undef, now it returns $sth->execute($id), so we can verify how many bookSellers have been deleted. Test Plan : prove t/db_dependant/Booksellers.t t/db_dependent/Bookseller.t .. 2/67 [Some warnings about uninitialized values] WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/kenza/workspace/kohaclone/C4/Bookseller.pm line 137. t/db_dependent/Bookseller.t .. ok All tests successful. Files=1, Tests=67, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.49 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Jonathan Druart changed: What|Removed |Added Depends on||10557 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 Jonathan Druart changed: What|Removed |Added Depends on||10556 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added CC||kenza.z...@biblibre.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528 kenza changed: What|Removed |Added Summary|C4::Bookseller.pm needs |UT: C4::Bookseller.pm needs |unit tests |unit tests -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/