Bugzilla – Attachment 130775 Details for
Bug 22000
Remove extraneous parameters from API route spec
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22000: Add unit test
Bug-22000-Add-unit-test.patch (text/plain), 1.41 KB, created by
Lari Taskula
on 2022-02-17 22:12:53 UTC
(
hide
)
Description:
Bug 22000: Add unit test
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2022-02-17 22:12:53 UTC
Size:
1.41 KB
patch
obsolete
>From 2dc04417061ea9934578238d759ca31ca15bfa9d Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 17 Feb 2022 22:10:50 +0000 >Subject: [PATCH] Bug 22000: Add unit test > >To test: >1. prove t/db_dependent/api/v1/illrequests.t >2. Observe test failure >t/db_dependent/api/v1/illrequests.t .. > # Failed test 'exact match for JSON Pointer ""' > # at t/db_dependent/api/v1/illrequests.t line 163. >... >--- > t/db_dependent/api/v1/illrequests.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/illrequests.t b/t/db_dependent/api/v1/illrequests.t >index 31c220c724..e250fc5eaf 100755 >--- a/t/db_dependent/api/v1/illrequests.t >+++ b/t/db_dependent/api/v1/illrequests.t >@@ -38,7 +38,7 @@ my $t = Test::Mojo->new('Koha::REST::V1'); > > subtest 'list() tests' => sub { > >- plan tests => 30; >+ plan tests => 33; > > # Mock ILLBackend (as object) > my $backend = Test::MockObject->new; >@@ -159,6 +159,11 @@ subtest 'list() tests' => sub { > ->status_is(200) > ->json_is( [ $response2 ] ); > >+ # Test status parameter >+ $t->get_ok( "//$userid:$password@/api/v1/illrequests?status=STATUS2" ) >+ ->status_is(200) >+ ->json_is( [ $response2 ] ); >+ > # Test the ILLHiddenRequestStatuses syspref > t::lib::Mocks::mock_preference( 'ILLHiddenRequestStatuses', 'STATUS1' ); > $t->get_ok( "//$userid:$password@/api/v1/illrequests" ) >-- >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 22000
: 130775