From aa59264b2ae8442898ad4c3b4aadf25b317da908 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 17 Nov 2020 10:45:00 -0300 Subject: [PATCH] Bug 27015: Unit tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Nick Clemens --- t/db_dependent/api/v1/holds.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 585e19a8a5..90a4cdabfb 100755 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -675,7 +675,7 @@ subtest 'add() tests (maxreserves behaviour)' => sub { subtest 'pickup_locations() tests' => sub { - plan tests => 6; + plan tests => 9; $schema->storage->txn_begin; @@ -775,5 +775,12 @@ subtest 'pickup_locations() tests' => sub { . "/pickup_locations" ) ->json_is( [ $library_1->to_api, $library_2->to_api ] ); + # filtering works! + $t->get_ok( "//$userid:$password@/api/v1/holds/" + . $hold_2->id + . '/pickup_locations?q={"marc_org_code": { "-like": "A%" }}' ) + ->json_is( [ $library_1->to_api ] ); + + $schema->storage->txn_rollback; }; -- 2.11.0