Bug 14526: Add some unit tests for MoveReserve
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 15 Jul 2015 12:17:11 +0000 (14:17 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 2 Sep 2015 17:53:42 +0000 (14:53 -0300)
commit1accce387030db73cbd2e9496ab642b351f8551b
treee5880b31238e0b96c8a8d55028a38c0994b9fc71
parentea6c4f5b8aab8f9bcb4ff0a32349f32016879230
Bug 14526: Add some unit tests for MoveReserve

The change in MoveReserve from the previous patch begs for a test.
Here we add some to Reserves.t.
In all six tests we place a hold, move it and check the reserves again.
Depending on the status of ConfirmFutureHolds, and the reservedate the
hold should be moved or not.

Test plan:
Run the unit test.
Bonus: If you run Reserves.t by applying this patch but without the first
patch that changed MoveReserve, tests 60 and 61 should fail:
    not ok 60 - MoveReserve filled future hold now
    not ok 61 - MoveReserve filled future waiting hold now
This may further illustrate the need of the first patch.

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/Reserves.t