Bug 28189: Fix PluginRoutes.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 17 May 2021 14:07:17 +0000 (16:07 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 17 May 2021 14:07:17 +0000 (16:07 +0200)
commitd5c155203e803ff94ab87e51ab753d919d493dc7
treecfa0be1c3fdb3b5dc98a69bd85e732186f03c32f
parent46bff3b8a58669a14135341ef729ce7f0d885983
Bug 28189: Fix PluginRoutes.t

So, this one was hidden.

The failures were:
    #   Failed test 'Bad plugins raise warning'
    #   at t/db_dependent/Koha/REST/Plugin/PluginRoutes.t line 75.
    # found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x556972b22da0):
    # found warning: Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x5569735b8368):
    # expected to find warning: (?^u:Could not load REST API spec bundle: Invalid JSON specification)
    # expected to find warning: (?^u:The resulting spec is invalid. Skipping Bad API Route Plugin)

And the correct error was (after a debug warn in JSON::Validator):
Warning: Could not load REST API spec bundle: Invalid JSON specification HASH(0x55fd0c3d3160):
- /info/version: Expected string - got number. at /usr/share/perl5/JSON/Validator.pm line 165.

So this patch fixes it, but I don't understand why it's only failing for
plugin routes however.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
api/v1/swagger/swagger.yaml