Bugzilla – Attachment 109420 Details for
Bug 25504
Wrong API spec breaks plack without meaningful error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25504: Fix failing tests
Bug-25504-Fix-failing-tests.patch (text/plain), 2.04 KB, created by
Jonathan Druart
on 2020-09-01 10:23:20 UTC
(
hide
)
Description:
Bug 25504: Fix failing tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-01 10:23:20 UTC
Size:
2.04 KB
patch
obsolete
>From 43d4bba6c6546e42e505e554d554e2be9a0af043 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 1 Sep 2020 12:11:54 +0200 >Subject: [PATCH] Bug 25504: Fix failing tests > >--- > t/db_dependent/Koha/REST/Plugin/PluginRoutes.t | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/REST/Plugin/PluginRoutes.t b/t/db_dependent/Koha/REST/Plugin/PluginRoutes.t >index 27af737ab0..a1b3055443 100644 >--- a/t/db_dependent/Koha/REST/Plugin/PluginRoutes.t >+++ b/t/db_dependent/Koha/REST/Plugin/PluginRoutes.t >@@ -20,6 +20,7 @@ use Modern::Perl; > use Test::More tests => 4; > use Test::Mojo; > use Test::Warn; >+use Test::MockModule; > > use File::Basename; > use t::lib::Mocks; >@@ -38,6 +39,12 @@ BEGIN { > use Koha::Database; > use Koha::Plugins; > >+my $logger = Test::MockModule->new('Koha::Logger'); >+$logger->mock('error', sub { >+ shift; >+ warn @_; >+}); >+ > my $schema = Koha::Database->new->schema; > > subtest 'Bad plugins tests' => sub { >@@ -61,9 +68,10 @@ subtest 'Bad plugins tests' => sub { > > # initialize Koha::REST::V1 after mocking > my $t; >- warning_is >+ warning_like > { $t = Test::Mojo->new('Koha::REST::V1'); } >- 'The resulting spec is invalid. Skipping Bad API Route Plugin', >+ [qr{Could not load REST API spec bundle: Invalid JSON specification}, >+ qr{The resulting spec is invalid. Skipping Bad API Route Plugin},], > 'Bad plugins raise warning'; > > my $routes = get_defined_routes($t); >@@ -139,9 +147,10 @@ subtest 'Anonymous access routes plugins tests' => sub { > > # initialize Koha::REST::V1 after mocking > my $t; >- warning_is >+ warning_like > { $t = Test::Mojo->new('Koha::REST::V1'); } >- 'The resulting spec is invalid. Skipping Bad API Route Plugin', >+ [qr{Could not load REST API spec bundle: Invalid JSON specification}, >+ qr{The resulting spec is invalid. Skipping Bad API Route Plugin},], > 'Bad plugins raise warning'; > > my $routes = get_defined_routes($t); >-- >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 25504
:
104884
|
104894
|
106011
|
109227
|
109228
|
109233
|
109234
|
109235
| 109420