From 3494a7248cc13ada8e84d3040ef3ec15e3d50cd3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 20 Aug 2020 12:38:23 +0100 Subject: [PATCH] Bug 18501: (follow-up) Remove duplicate test The ModItem test found in t/db_dependent/Items.t was a duplciate (but slightly less functional) for the test we introduced for the *_on trigger functionality in t/db_dependent/Koha/Items.t::store The failure was a missing C4::Context mock, but the logical fix is to simply remove the duplicate test. Signed-off-by: Martin Renvoize --- t/db_dependent/Items.t | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index 010b41e97a..3da406ac9e 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -33,7 +33,7 @@ use Koha::AuthorisedValues; use t::lib::Mocks; use t::lib::TestBuilder; -use Test::More tests => 15; +use Test::More tests => 14; use Test::Warn; @@ -126,31 +126,6 @@ subtest 'General Add, Get and Del tests' => sub { $schema->storage->txn_rollback; }; -subtest 'ModItem tests' => sub { - plan tests => 6; - - $schema->storage->txn_begin; - - my $builder = t::lib::TestBuilder->new; - my $item = $builder->build_sample_item(); - - my @fields = qw( itemlost withdrawn damaged ); - for my $field (@fields) { - my $field_on = $field."_on"; - - $item->$field(1)->store; - $item->discard_changes; - is( output_pref({ str => $item->$field_on, dateonly => 1 }), output_pref({ dt => dt_from_string(), dateonly => 1 }), "When updating $field, $field_on is updated" ); - - $item->$field(0)->store; - $item->discard_changes; - is( $item->$field_on, undef, "When clearing $field, $field_on is cleared" ); - } - - $schema->storage->txn_rollback; - -}; - subtest 'ModItemTransfer tests' => sub { plan tests => 8; -- 2.20.1