Bugzilla – Attachment 84666 Details for
Bug 19915
Inventory tool doesn't use cn_sort for callnumber ranges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19915: (QA follow-up) Tidy up GetItemsForInventory.t
Bug-19915-QA-follow-up-Tidy-up-GetItemsForInventor.patch (text/plain), 2.82 KB, created by
Katrin Fischer
on 2019-02-02 17:06:19 UTC
(
hide
)
Description:
Bug 19915: (QA follow-up) Tidy up GetItemsForInventory.t
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-02-02 17:06:19 UTC
Size:
2.82 KB
patch
obsolete
>From cb1322ade2e12fe5e637ac7a2ccd226e16ed1c33 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 6 Jul 2018 11:20:47 +0200 >Subject: [PATCH] Bug 19915: (QA follow-up) Tidy up GetItemsForInventory.t > >Standard edits like modules, schema, Koha objects instead of DBIC. >Removing unneeded autoflush. >Moving initial test to a first subtest. >No need to clear issues if you clear items. >Adding a FIXME for OldWay; would be nice to remove that code.. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >https://bugs.koha-community.org/show_bug.cgi?id=19905 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Items/GetItemsForInventory.t | 30 ++++++++++++++++------------- > 1 file changed, 17 insertions(+), 13 deletions(-) > >diff --git a/t/db_dependent/Items/GetItemsForInventory.t b/t/db_dependent/Items/GetItemsForInventory.t >index fbdce50287..85e2bf99c2 100755 >--- a/t/db_dependent/Items/GetItemsForInventory.t >+++ b/t/db_dependent/Items/GetItemsForInventory.t >@@ -60,7 +60,6 @@ subtest 'Old version is unchanged' => sub { > $schema->storage->txn_rollback; > }; > >-<<<<<<< HEAD > subtest 'Skip items with waiting holds' => sub { > > plan tests => 6; >@@ -127,18 +126,24 @@ subtest 'Skip items with waiting holds' => sub { > 'Item on hold skipped, no one matches' ); > > $schema->storage->txn_rollback; >-======= >-$dbh->rollback; >-$dbh->{AutoCommit} = 1; >+}; > >-subtest 'Use cn_sort rather than callnumber to determine correct location' => sub { >+subtest 'Verify results with OldWay' => sub { >+ $schema->storage->txn_begin; >+ plan tests => 1; > >+ my ($oldResults, $oldCount) = OldWay(); >+ my ($newResults, $newCount) = GetItemsForInventory(); >+ is_deeply($newResults,$oldResults,"Inventory results unchanged."); >+ $schema->storage->txn_rollback; >+}; >+ >+subtest 'Use cn_sort rather than callnumber to determine correct location' => sub { >+ $schema->storage->txn_begin; > plan tests => 1; >+ > my $builder = t::lib::TestBuilder->new; >- my $schema = Koha::Database->new->schema; >- $schema->storage->txn_begin; >- $builder->schema->resultset( 'Issue' )->delete_all; >- $builder->schema->resultset( 'Item' )->delete_all; >+ Koha::Items->delete; > > my $class_rule = $builder->build({ > source => 'ClassSortRule', >@@ -166,12 +171,11 @@ subtest 'Use cn_sort rather than callnumber to determine correct location' => su > is($item_count,1,"We should return GT95 as between GT90 and GT100"); > $schema->storage->txn_rollback; > >->>>>>>> Bug 19915: Add unit test to GetItemsForInventory.t > }; > >-sub OldWay { >- my ($tdbh) = @_; >- my $ldbh = $tdbh; >+sub OldWay { # FIXME Do we really still need so much code to check results ?? >+ my $ldbh = C4::Context->dbh; >+ > my $minlocation = ''; > my $maxlocation = ''; > my $location = ''; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19915
:
70274
|
70275
|
70338
|
70339
|
72950
|
72951
|
72988
|
72989
|
76120
|
76721
|
76722
|
76723
|
76724
|
81816
|
81817
|
81818
|
81819
|
81820
|
81821
|
83644
|
83645
|
83646
|
83647
|
83648
|
83649
|
84665
| 84666 |
84667
|
84668
|
84669
|
84670