Bug 11445: regression test for duplicate hold notifications
commit4dbe5453a29b7d14f7ee45294f8172f75c245fd0
authorGalen Charlton <gmc@esilibrary.com>
Wed, 25 Dec 2013 17:38:39 +0000 (25 17:38 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 27 Jan 2014 13:11:37 +0000 (27 14:11 +0100)
treef438abda831b36d9f71b83a2cc0eef2aab53db23
parent651d2120797a51a99c7cfa16b3a60f60da3829c1
Bug 11445: regression test for duplicate hold notifications

This patch implements a regression test for verifying that
duplicate hold notifications aren't sent if ModReserveAffect() is
called repeatedly (as might happen if a circ operator accidentally
checks in an item and confirms its hold more than once).

Note that the test depends on the fact that _koha_notify_reserve()
defaults to sending a HOLD_PRINT letter if the borrower has not
specified an email or SMS hold notification.

To test:

[1] Run prove -v t/db_dependent/Reserves.t
[2] The 'patron not notified a second time (bug 11445)' test
    should fail.
[3] Apply the main patch and run prove -v t/db_dependent/Reserves.t
    again.  This time all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2b6a20c509801b9eeb562aa6fd404546d6ba84df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Reserves.t