@@ -, +, @@ --- t/db_dependent/Koha/Checkouts/ReturnClaim.t | 27 +-------------------- 1 file changed, 1 insertion(+), 26 deletions(-) --- a/t/db_dependent/Koha/Checkouts/ReturnClaim.t +++ a/t/db_dependent/Koha/Checkouts/ReturnClaim.t @@ -31,7 +31,7 @@ my $builder = t::lib::TestBuilder->new; subtest "store() tests" => sub { - plan tests => 13; + plan tests => 11; $schema->storage->txn_begin; @@ -109,31 +109,6 @@ subtest "store() tests" => sub { is( ref($claim), 'Koha::Checkouts::ReturnClaim', 'Object type is correct' ); is( Koha::Checkouts::ReturnClaims->search( { issue_id => $checkout->id } )->count, 1, 'Claim stored on the DB'); - { # hide useless warnings - local *STDERR; - open STDERR, '>', '/dev/null'; - throws_ok { - Koha::Checkouts::ReturnClaim->new( - { - issue_id => $checkout->id, - itemnumber => $checkout->itemnumber, - borrowernumber => $checkout->borrowernumber, - notes => 'Some notes', - created_by => $librarian->borrowernumber - } - )->store; - } - 'Koha::Exceptions::Object::DuplicateID', - 'An exception is thrown on duplicate issue_id'; - close STDERR; - - like( - $@->duplicate_id, - qr/(return_claims\.)?issue_id/, - 'Exception field is correct' - ); - } - { # hide useless warnings local *STDERR; open STDERR, '>', '/dev/null'; --