Bugzilla – Attachment 162292 Details for
Bug 36075
Add API route to list recalls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36075: (QA follow-up): Fix tests
Bug-36075-QA-follow-up-Fix-tests.patch (text/plain), 1.90 KB, created by
Pedro Amorim
on 2024-02-20 10:27:43 UTC
(
hide
)
Description:
Bug 36075: (QA follow-up): Fix tests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-02-20 10:27:43 UTC
Size:
1.90 KB
patch
obsolete
>From 71113bbfc4e93ca1696db9b440b2e6c483ca6073 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 20 Feb 2024 10:23:02 +0000 >Subject: [PATCH] Bug 36075: (QA follow-up): Fix tests > >recall_1 needs to specifically be completed => 0 or else it'll sometimes be 1 and other times be 0 when running tests, causing tests to sometimes fails and other times succeed > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > t/db_dependent/api/v1/recalls.t | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/api/v1/recalls.t b/t/db_dependent/api/v1/recalls.t >index 54c2265ebe2..b51ea9dc0f1 100755 >--- a/t/db_dependent/api/v1/recalls.t >+++ b/t/db_dependent/api/v1/recalls.t >@@ -50,15 +50,16 @@ subtest 'list() tests' => sub { > > $t->get_ok("//$userid:$password@/api/v1/recalls")->status_is( 200, 'SWAGGER3.2.2' )->json_is( [] ); > >- my $recall_1 = $builder->build_object( { class => 'Koha::Recalls', value => { patron_id => $patron->id } } ); >+ my $recall_1 = >+ $builder->build_object( { class => 'Koha::Recalls', value => { patron_id => $patron->id, completed => 0 } } ); > my $recall_2 = > $builder->build_object( { class => 'Koha::Recalls', value => { patron_id => $patron->id, completed => 1 } } ); > > $t->get_ok( "//$userid:$password@/api/v1/recalls?patron_id=" . $patron->id )->status_is( 200, 'SWAGGER3.2.2' ) > ->json_is( '' => [ $recall_1->to_api, $recall_2->to_api ], 'Recalls for patron retrieved' ); > >- $t->get_ok( "//$userid:$password@/api/v1/recalls?completed=false" ) >- ->status_is( 200, 'SWAGGER3.2.2' )->json_is( '' => [ $recall_1->to_api ], 'Current recalls retrieved' ); >+ $t->get_ok("//$userid:$password@/api/v1/recalls?completed=false")->status_is( 200, 'SWAGGER3.2.2' ) >+ ->json_is( '' => [ $recall_1->to_api ], 'Current recalls retrieved' ); > > $schema->storage->txn_rollback; > }; >-- >2.30.2
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 36075
:
162075
|
162087
|
162290
|
162291
| 162292