This patch clears the subscription table so tests pass correctly if
there happens to have been a subscription with an end date before
2013-08-01.
To test
1/ Add a subscription in the serials module, with an end date before
2013-08-01
2/ run prove -v t/db_dependent/Bookseller.t
Notice tests 22 and 23 fail
3/ Apply patch
4/ run test again
5/ Notice tests succeed
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests now clean the subscription table before running
the tests, so that the will always pass.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch also corrects an error in the description of
NewSubscription().
Named parameters for this function cannot come soon enough.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This adds a test to verify that the public subscription
note is returned by a subscription search.
To test:
[1] Verify that t/db_dependent/Bookseller.t passes.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch fixes some incoherences of the routine
GetBooksellerWithOrders().
Now it considers the field $estimateddeliverydateto and it replaces it
by now() only if it is undef.
Also, 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 and return undef if it is a negative
value.
To Test:
Before, this routine sorts out the BookSellerWithLateOrders. If a
bookseller did not specify a deliverytime, it would never appears in
the list of LateOrders. Moreover, if the field "Estimated delivery
date to" was specified, it didn't take care of the value and it
returns the late order up to today's date.
Now, the returned list considers all the fields give and if the
delivery time of the bookseller is not specified, it calculates the
late orders as if the deliverytime is 0. By default, all booksellers
which have orders in late until today are listed unless "estimated
delivery date to" is specified.
prove t/db_dependent/Bookseller.t
t/db_dependent/Bookseller.t ..
[Some warnings about uninitialized values]
WARNING: GetBooksellerWithLateOrders is called with a negative value at C4/Bookseller.pm line 135.
t/db_dependent/Bookseller.t .. ok
All tests successful.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Before, ModBookseller always returns undef. This patch modifies it in
order to be more explicit.
Now it returns :
1 -> If a modification has been done
0E0 -> If the given ID doesn't exist
undef -> If no ID given
It also fixes one of the tests which didn't pass before
in t/db_dependent/Bookseller.t
To Test:
prove t/db_dependent/Bookseller.t
Bookseller.t .. 1/54
[Some warnings about uninitialized values]
t/db_dependent/Bookseller.t .. ok
All tests successful.
Files=1, Tests=54, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.46 cusr 0.04 csys = 0.53 CPU)
Result: PASS
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Change is logical and passes new and old tests.
Fixed the author line to have Kenza's correct email address.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes DelBookseller returns the number of suppliers it has
deleted or undef if an error has occurred.
It also fixes a test which doesn't pass before in t/db_dependent/Bookseller.t
To test:
prove t/db_dependent/Bookseller.t
t/db_dependent/Bookseller.t .. 1/54
All tests successful.
Files=1, Tests=54, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.48 cusr 0.02 csys = 0.52 CPU)
Result: PASS
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Logical change and makes another test pass :)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The tests are wrapped 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 <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
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.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>