Bugzilla – Attachment 93143 Details for
Bug 23517
Add API route to update a holds priority
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23517: (follow-up) AddReserve expects a priority parameter
Bug-23517-follow-up-AddReserve-expects-a-priority-.patch (text/plain), 3.46 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-09-24 14:40:12 UTC
(
hide
)
Description:
Bug 23517: (follow-up) AddReserve expects a priority parameter
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-09-24 14:40:12 UTC
Size:
3.46 KB
patch
obsolete
>From 956922b5953b96df74e925571847d36b03840295 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 24 Sep 2019 11:39:17 -0300 >Subject: [PATCH] Bug 23517: (follow-up) AddReserve expects a priority > parameter > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/api/v1/holds.t | 62 +++++++++++++++++++---------------- > 1 file changed, 33 insertions(+), 29 deletions(-) > >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index b0a5a191a7..099757934c 100644 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -354,6 +354,7 @@ subtest 'PUT /holds/{hold_id}/priority tests' => sub { > > my $password = 'AbcdEFG123'; > >+ my $library = $builder->build_object({ class => 'Koha::Libraries' }); > my $patron_np = $builder->build_object( > { class => 'Koha::Patrons', value => { flags => 0 } } ); > $patron_np->set_password( { password => $password, skip_validation => 1 } ); >@@ -378,45 +379,48 @@ subtest 'PUT /holds/{hold_id}/priority tests' => sub { > t::lib::Mocks::mock_preference( 'HoldsLog', 0 ); > t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); > >- my $biblio = $builder->build_sample_biblio; >- >- my $hold_1 = $builder->build_object( >+ my $biblio = $builder->build_sample_biblio; >+ my $patron_1 = $builder->build_object( > { >- class => 'Koha::Holds', >- value => { >- suspend => 0, >- suspend_until => undef, >- waitingdate => undef, >- biblionumber => $biblio->biblionumber, >- priority => 1 >- } >+ class => 'Koha::Patrons', >+ value => { branchcode => $library->branchcode } > } > ); >- my $hold_2 = $builder->build_object( >+ my $patron_2 = $builder->build_object( > { >- class => 'Koha::Holds', >- value => { >- suspend => 0, >- suspend_until => undef, >- waitingdate => undef, >- biblionumber => $biblio->biblionumber, >- priority => 2 >- } >+ class => 'Koha::Patrons', >+ value => { branchcode => $library->branchcode } > } > ); >- my $hold_3 = $builder->build_object( >+ my $patron_3 = $builder->build_object( > { >- class => 'Koha::Holds', >- value => { >- suspend => 0, >- suspend_until => undef, >- waitingdate => undef, >- biblionumber => $biblio->biblionumber, >- priority => 3 >- } >+ class => 'Koha::Patrons', >+ value => { branchcode => $library->branchcode } > } > ); > >+ my $hold_1 = Koha::Holds->find( >+ AddReserve( >+ $library->branchcode, $patron_1->borrowernumber, >+ $biblio->biblionumber, undef, >+ 1 >+ ) >+ ); >+ my $hold_2 = Koha::Holds->find( >+ AddReserve( >+ $library->branchcode, $patron_2->borrowernumber, >+ $biblio->biblionumber, undef, >+ 2 >+ ) >+ ); >+ my $hold_3 = Koha::Holds->find( >+ AddReserve( >+ $library->branchcode, $patron_3->borrowernumber, >+ $biblio->biblionumber, undef, >+ 3 >+ ) >+ ); >+ > $t->put_ok( "//$userid_np:$password@/api/v1/holds/" > . $hold_3->id > . "/priority" => json => 1 )->status_is(403); >-- >2.23.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 23517
:
92588
|
92589
|
92590
|
92710
|
92711
|
92712
|
92836
|
92927
|
92928
|
92929
|
92930
|
92986
|
92987
|
92988
|
92989
| 93143