Bugzilla – Attachment 153044 Details for
Bug 32801
/checkouts?checked_in=1 errors when itemnumber is null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32801: Add tests
Bug-32801-Add-tests.patch (text/plain), 1.23 KB, created by
Jonathan Druart
on 2023-07-05 10:28:18 UTC
(
hide
)
Description:
Bug 32801: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-05 10:28:18 UTC
Size:
1.23 KB
patch
obsolete
>From 690982a2ac3301e9246c1a238b76971d5e333c6e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2023 12:25:40 +0200 >Subject: [PATCH] Bug 32801: Add tests > >--- > t/db_dependent/api/v1/checkouts.t | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/checkouts.t b/t/db_dependent/api/v1/checkouts.t >index 2e749aa8741..6e6b24de137 100755 >--- a/t/db_dependent/api/v1/checkouts.t >+++ b/t/db_dependent/api/v1/checkouts.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 101; >+use Test::More tests => 105; > use Test::MockModule; > use Test::Mojo; > use t::lib::Mocks; >@@ -126,6 +126,12 @@ $t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id&checked_ > ->json_is('/0/item_id' => $item4->itemnumber) > ->json_hasnt('/1'); > >+$item4->delete; >+$t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id&checked_in=1" ) >+ ->status_is(200) >+ ->json_is('/0/patron_id' => $patron_id) >+ ->json_is('/0/item_id' => undef); >+ > $t->get_ok( "//$unauth_userid:$unauth_password@/api/v1/checkouts/" . $issue3->issue_id ) > ->status_is(403) > ->json_is({ error => "Authorization failure. Missing required permission(s).", >-- >2.25.1
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 32801
:
153044
|
153045
|
153106
|
153107
|
153340