Bugzilla – Attachment 52923 Details for
Bug 16671
Wrong itemtype picked in HoldsQueue.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16671: [QA Follow-up] Replace remaining itemtype lines
Bug-16671-QA-Follow-up-Replace-remaining-itemtype-.patch (text/plain), 2.69 KB, created by
Marcel de Rooy
on 2016-06-28 13:40:11 UTC
(
hide
)
Description:
Bug 16671: [QA Follow-up] Replace remaining itemtype lines
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-06-28 13:40:11 UTC
Size:
2.69 KB
patch
obsolete
>From ca68fec9709ac500b01f858689bf5d4d81031495 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 28 Jun 2016 15:21:53 +0200 >Subject: [PATCH] Bug 16671: [QA Follow-up] Replace remaining itemtype lines >Content-Type: text/plain; charset=utf-8 > >Instead of relying on existing data, we use new TestBuilder recs. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/HoldsQueue.t | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 5302b47..056edb5 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -17,12 +17,9 @@ use C4::Context; > use C4::Members; > use Koha::Database; > use Koha::DateUtils; >-use Koha::ItemType; > > use t::lib::TestBuilder; > >-use Koha::ItemTypes; >- > BEGIN { > use FindBin; > use lib $FindBin::Bin; >@@ -178,7 +175,7 @@ $dbh->do("DELETE FROM default_circ_rules"); > > C4::Context->set_preference('UseTransportCostMatrix', 0); > >-$itemtype = Koha::ItemTypes->search->next->itemtype; >+$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; > > $library1 = $builder->build({ > source => 'Branch', >@@ -337,7 +334,7 @@ is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed librari > C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 ); > > # Bug 14297 >-$itemtype = Koha::ItemTypes->search->next->itemtype; >+$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; > $borrowernumber = $borrower3->{borrowernumber}; > my $library_A = $library1->{branchcode}; > my $library_B = $library2->{branchcode}; >@@ -394,7 +391,7 @@ is( @$holds_queue, 1, "Bug 14297 - Holds Queue building ignoring holds where pic > # End Bug 14297 > > # Bug 15062 >-$itemtype = Koha::ItemTypes->search->next->itemtype; >+$itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; > $borrowernumber = $borrower2->{borrowernumber}; > $library_A = $library1->{branchcode}; > $library_B = $library2->{branchcode}; >@@ -555,9 +552,8 @@ CancelReserve( { reserve_id => $reserve_id } ); > > # Test hold itemtype limit > C4::Context->set_preference( "UseTransportCostMatrix", 0 ); >-my @itemtypes = Koha::ItemTypes->search(); >-my $wrong_itemtype = $itemtypes[0]->itemtype; >-my $right_itemtype = $itemtypes[1]->itemtype; >+my $wrong_itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; >+my $right_itemtype = $builder->build({ source => 'Itemtype', value => { notforloan => 0 } })->{itemtype}; > $borrowernumber = $borrower3->{borrowernumber}; > my $branchcode = $library1->{branchcode}; > $dbh->do("DELETE FROM reserves"); >-- >1.7.10.4
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 16671
:
52078
|
52096
|
52887
|
52888
|
52921
|
52922
| 52923