Bugzilla – Attachment 57601 Details for
Bug 17431
Fix failing test t/db_dependent/api/v1/holds.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17431: (follow-up) Fix issuingrules
Bug-17431-follow-up-Fix-issuingrules.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-11-17 14:29:03 UTC
(
hide
)
Description:
Bug 17431: (follow-up) Fix issuingrules
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-11-17 14:29:03 UTC
Size:
1.91 KB
patch
obsolete
>From 9af42093f43ed26dccccb56b07e915c36f8d415d Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Wed, 19 Oct 2016 15:18:02 +0300 >Subject: [PATCH] Bug 17431: (follow-up) Fix issuingrules > >Issuingrules could had prevented holds.t from passing with error tooManyReserves. >This patch sets issuingrules at the beginning of the test to make sure reserves >are allowed. > >To test: >1. Apply patch & Run t/db_dependent/api/v1/holds.t >2. Observe test pass > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/api/v1/holds.t | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index 184beff..8e79d19 100644 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -114,6 +114,11 @@ my $biblionumber2 = create_biblio('RESTful Web APIs'); > my $itemnumber2 = create_item($biblionumber2, 'TEST000002'); > > $dbh->do('DELETE FROM reserves'); >+$dbh->do('DELETE FROM issuingrules'); >+ $dbh->do(q{ >+ INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed) >+ VALUES (?, ?, ?, ?) >+ }, {}, '*', '*', '*', 1); > > my $reserve_id = C4::Reserves::AddReserve($branchcode, $borrowernumber, > $biblionumber, undef, 1, undef, undef, undef, '', $itemnumber); >@@ -263,12 +268,6 @@ subtest "Test endpoints with permission" => sub { > ->status_is(200) > ->json_is([]); > >- $dbh->do('DELETE FROM issuingrules'); >- $dbh->do(q{ >- INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed) >- VALUES (?, ?, ?, ?) >- }, {}, '*', '*', '*', 1); >- > $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id2"); > $tx->req->cookies({name => 'CGISESSID', value => $session3->id}); > $t->request_ok($tx) >-- >2.7.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 17431
:
56252
|
56288
|
56655
|
56656
|
56657
|
56658
|
57258
|
57282
|
57283
|
57284
|
57285
|
57584
|
57585
|
57600
| 57601 |
57602
|
57603