[Koha-bugs] [Bug 10528] UT: C4::Bookseller.pm needs unit tests
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jul 19 05:34:57 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10528
Srdjan Jankovic <srdjan at catalyst.net.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #19756|0 |1
is obsolete| |
--- Comment #9 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
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 <srdjan at catalyst.net.nz>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list