Browse Source

Bug 27993: Add unit tests

This patch adds a unit test to check that 'in_transit' takes
datecancelled into account.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Martin Renvoize 2 years ago
committed by Jonathan Druart
parent
commit
87cc346e48
  1. 4
      t/db_dependent/Koha/Item/Transfer.t

4
t/db_dependent/Koha/Item/Transfer.t

@ -173,7 +173,7 @@ subtest 'receive tests' => sub {
subtest 'in_transit tests' => sub {
plan tests => 3;
plan tests => 4;
$schema->storage->txn_begin;
@ -203,6 +203,8 @@ subtest 'in_transit tests' => sub {
$transfer->datearrived(dt_from_string)->store;
ok( !$transfer->in_transit, 'in_transit returns false when datearrived is defined');
$transfer->set( { datearrived => undef, datecancelled => dt_from_string } )->store;
ok( !$transfer->in_transit, 'in_transit returns false when datecancelled is defined');
$schema->storage->txn_rollback;
};

Loading…
Cancel
Save