Bug 30254: Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba6b380d91
)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
This commit is contained in:
parent
e7b6af954d
commit
c5e8dcb52d
1 changed files with 9 additions and 1 deletions
|
@ -1471,7 +1471,7 @@ subtest 'store() tests' => sub {
|
|||
|
||||
subtest '_set_found_trigger() tests' => sub {
|
||||
|
||||
plan tests => 8;
|
||||
plan tests => 9;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
@ -1541,6 +1541,14 @@ subtest 'store() tests' => sub {
|
|||
'type is correct'
|
||||
);
|
||||
|
||||
# Let's build a new item
|
||||
$item = $builder->build_sample_item({ itemlost => 1, itemlost_on => dt_from_string() });
|
||||
$item->set( { itemlost => 0 } )->store;
|
||||
|
||||
$messages = $item->object_messages;
|
||||
warn Data::Dumper::Dumper( $messages );
|
||||
is( scalar @{$messages}, 0, 'This item has no history, no associated lost fines, presumed not lost by patron, no messages returned');
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue