From 4193cda0f1dc2a982d5996c7c9bd973e0f67fbca Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 27 Apr 2023 13:29:03 +0100 Subject: [PATCH] Bug 33229: (RMaint follow-up) Remove errant test from bug 31051 The backport braught in more than expected in the tests ;P Signed-off-by: Martin Renvoize --- t/db_dependent/Koha/Patron.t | 50 +----------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t index 249c9ccfc8..019889c856 100755 --- a/t/db_dependent/Koha/Patron.t +++ b/t/db_dependent/Koha/Patron.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 21; +use Test::More tests => 20; use Test::Exception; use Test::Warn; @@ -1350,54 +1350,6 @@ subtest 'notify_library_of_registration()' => sub { $schema->storage->txn_rollback; }; -subtest 'get_savings tests' => sub { - - plan tests => 4; - - $schema->storage->txn_begin; - - my $library = $builder->build_object({ class => 'Koha::Libraries' }); - my $patron = $builder->build_object({ class => 'Koha::Patrons' }, { value => { branchcode => $library->branchcode } }); - - t::lib::Mocks::mock_userenv({ patron => $patron, branchcode => $library->branchcode }); - - my $biblio = $builder->build_sample_biblio; - my $item1 = $builder->build_sample_item( - { - biblionumber => $biblio->biblionumber, - library => $library->branchcode, - replacementprice => rand(20), - } - ); - my $item2 = $builder->build_sample_item( - { - biblionumber => $biblio->biblionumber, - library => $library->branchcode, - replacementprice => rand(20), - } - ); - - is( $patron->get_savings, 0, 'No checkouts, no savings' ); - - # Add an old checkout with deleted itemnumber - $builder->build_object({ class => 'Koha::Old::Checkouts', value => { itemnumber => undef, borrowernumber => $patron->id } }); - - is( $patron->get_savings, 0, 'No checkouts with itemnumber, no savings' ); - - AddIssue( $patron->unblessed, $item1->barcode ); - AddIssue( $patron->unblessed, $item2->barcode ); - - my $savings = $patron->get_savings; - is( $savings + 0, $item1->replacementprice + $item2->replacementprice, "Savings correctly calculated from current issues" ); - - AddReturn( $item2->barcode, $item2->homebranch ); - - $savings = $patron->get_savings; - is( $savings + 0, $item1->replacementprice + $item2->replacementprice, "Savings correctly calculated from current and old issues" ); - - $schema->storage->txn_rollback; -}; - subtest 'update privacy tests' => sub { plan tests => 5; -- 2.39.2