Bug 30394: Unit tests
This patch adds tests for checking the x-koha-request-id header is returned on GET routes that have it enabled, and then the request includes it. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/query.t => FAIL: The feature is not implemented, tests fail Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
fe4101140e
commit
9453fc6a9f
|
|
@ -34,7 +34,7 @@ t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 );
|
|||
|
||||
subtest 'q handling tests' => sub {
|
||||
|
||||
plan tests => 15;
|
||||
plan tests => 17;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
|
@ -100,5 +100,8 @@ subtest 'q handling tests' => sub {
|
|||
|
||||
is( scalar @{$cities}, 1, 'empty list as first query, 1 city retrieved' );
|
||||
|
||||
$t->get_ok("//$userid:$password@/api/v1/cities" => { 'x-koha-request-id' => 100 } )
|
||||
->header_is( 'x-koha-request-id' => 100 );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue