Bugzilla – Attachment 134900 Details for
Bug 30677
Unknown column 'biblioitem.title' in 'where clause' 500 error in API /api/v1/acquisitions/orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30677: Add tests
Bug-30677-Add-tests.patch (text/plain), 2.07 KB, created by
Martin Renvoize (ashimema)
on 2022-05-11 15:50:51 UTC
(
hide
)
Description:
Bug 30677: Add tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-05-11 15:50:51 UTC
Size:
2.07 KB
patch
obsolete
>From ac31daefa9dbac259a5f38f4cdc2fc6250231f2c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 6 May 2022 13:53:01 +0200 >Subject: [PATCH] Bug 30677: Add tests > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/api/v1/acquisitions_orders.t | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/acquisitions_orders.t b/t/db_dependent/api/v1/acquisitions_orders.t >index cee1aecb5e..40a6ec6685 100755 >--- a/t/db_dependent/api/v1/acquisitions_orders.t >+++ b/t/db_dependent/api/v1/acquisitions_orders.t >@@ -38,7 +38,7 @@ my $t = Test::Mojo->new('Koha::REST::V1'); > > subtest 'list() tests' => sub { > >- plan tests => 19; >+ plan tests => 24; > > $schema->storage->txn_begin; > >@@ -111,12 +111,18 @@ subtest 'list() tests' => sub { > }; > > my $query = { "biblio.isbn" => { "-like" => "\%SOMETHING\%" } }; >- > $t->get_ok( "//$userid:$password@/api/v1/acquisitions/orders?q=" . encode_json($query) => {'x-koha-embed' => 'biblio'} ) > ->status_is( 200, "Embedding biblio and searching on biblio.isbn doesn't make it explode" ) > ->json_has( "/0/biblio", "biblio object correctly embedded" ) > ->json_is( "/0/biblio/isbn", 'SOMETHING', 'Filtering by a biblioitems column works!' ); > >+ $query = { "biblio.isbn" => { "-like" => "\%SOMETHING\%" }, "biblio.title" => { -like => "\%\%" } }; >+ $t->get_ok( "//$userid:$password@/api/v1/acquisitions/orders?q=" . encode_json($query) => {'x-koha-embed' => 'biblio'} ) >+ ->status_is( 200, "Embedding biblio and searching on biblio.isbn and biblio.title doesn't make it explode" ) >+ ->json_has( "/0/biblio", "biblio object correctly embedded" ) >+ ->json_is( "/0/biblio/isbn", 'SOMETHING', 'Filtering by a biblioitem column works!' ) >+ ->json_is( "/0/biblio/title", $biblio->title, 'Filtering by a biblioitem and biblio columns works!' ); >+ > my $result = $t->get_ok( "//$userid:$password@/api/v1/acquisitions/orders?biblio_id=" . $biblio->biblionumber ) > ->status_is( 200 ); > >-- >2.20.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 30677
:
134724
|
134900
|
134901
|
136677
|
136678
|
136679
|
136680