Bugzilla – Attachment 132072 Details for
Bug 30194
Update required JSON::Validator version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30194: (follow-up) Remove invalid tests
Bug-30194-follow-up-Remove-invalid-tests.patch (text/plain), 2.55 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-03-23 18:17:25 UTC
(
hide
)
Description:
Bug 30194: (follow-up) Remove invalid tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-03-23 18:17:25 UTC
Size:
2.55 KB
patch
obsolete
>From a36d52f0a330b669b01750a47fc20990aa9e3c8e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 8 Mar 2022 15:43:28 -0300 >Subject: [PATCH] Bug 30194: (follow-up) Remove invalid tests > >This patch removes tests for the wrong 'Accept' header situation. It is >the only thing I found I could do. > >The situation is: the JSON::Validator + Mojolicious::Plugin::OpenAPI is >trapping this case and returning its own error code (400) and it also >builds its own message! So no point testing it, as it can change again. > >I post it as a separate patch just in case someone finds a better way to >handle this and obsoletes the patch :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/api/v1/biblios.t | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > >diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t >index 5c836c39d8..ca7a23e1e7 100755 >--- a/t/db_dependent/api/v1/biblios.t >+++ b/t/db_dependent/api/v1/biblios.t >@@ -45,7 +45,7 @@ my $t = Test::Mojo->new('Koha::REST::V1'); > > subtest 'get() tests' => sub { > >- plan tests => 22; >+ plan tests => 21; > > $schema->storage->txn_begin; > >@@ -71,12 +71,7 @@ subtest 'get() tests' => sub { > > $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber > => { Accept => 'application/weird+format' } ) >- ->status_is(406) >- ->json_is( [ "application/json", >- "application/marcxml+xml", >- "application/marc-in-json", >- "application/marc", >- "text/plain" ] ); >+ ->status_is(400); > > $t->get_ok( "//$userid:$password@/api/v1/biblios/" . $biblio->biblionumber > => { Accept => 'application/json' } ) >@@ -223,7 +218,7 @@ subtest 'delete() tests' => sub { > > subtest 'get_public() tests' => sub { > >- plan tests => 26; >+ plan tests => 25; > > $schema->storage->txn_begin; > >@@ -256,11 +251,7 @@ subtest 'get_public() tests' => sub { > > $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber > => { Accept => 'application/weird+format' } ) >- ->status_is(406) >- ->json_is( [ "application/marcxml+xml", >- "application/marc-in-json", >- "application/marc", >- "text/plain" ] ); >+ ->status_is(400); > > $t->get_ok( "//$userid:$password@/api/v1/public/biblios/" . $biblio->biblionumber > => { Accept => 'text/plain' } ) >-- >2.35.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 30194
:
131374
|
131486
|
131487
|
131488
|
131497
|
131498
|
131499
|
131500
|
131501
|
131502
|
131547
|
131548
|
131549
|
131550
|
131551
|
131552
|
132069
|
132070
|
132071
|
132072
|
132073
|
132097
|
132098
|
132099
|
132100
|
132102
|
132112
|
132116
|
132118
|
132119
|
132120
|
132121
|
132122
|
132123
|
132124
|
132125
|
132126
|
132151
|
132152
|
132252
|
132253
|
132254
|
132334
|
132335
|
132336
|
132337
|
132338
|
132339
|
132340
|
132442
|
132449