Bug 21652: Unit test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
3eb290c949
commit
3e7ffca76c
|
|
@ -29,7 +29,7 @@ use Koha::Item;
|
|||
use Koha::DateUtils qw( dt_from_string );
|
||||
use t::lib::TestBuilder;
|
||||
|
||||
use Test::More tests => 34;
|
||||
use Test::More tests => 35;
|
||||
use Test::Exception;
|
||||
use Test::Warn;
|
||||
|
||||
|
|
@ -225,6 +225,25 @@ subtest "store() tests" => sub {
|
|||
$schema->storage->txn_rollback();
|
||||
};
|
||||
|
||||
subtest "set_waiting() tests" => sub {
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$schema->storage->txn_begin();
|
||||
|
||||
# Disable logging
|
||||
t::lib::Mocks::mock_preference( 'HoldsLog', 0 );
|
||||
|
||||
my $hold = $builder->build_object({ class => 'Koha::Holds' });
|
||||
|
||||
$hold->waitingdate('2021-01-01');
|
||||
|
||||
$hold->set_waiting();
|
||||
|
||||
is($hold->waitingdate,'2021-01-01',"Setting waiting when already waiting should not update waitingdate");
|
||||
|
||||
};
|
||||
|
||||
subtest "delete() tests" => sub {
|
||||
|
||||
plan tests => 6;
|
||||
|
|
|
|||
Loading…
Reference in New Issue