From 06c1c37034be8f1232f29f2240542e47bf4ee8a8 Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Tue, 13 Aug 2024 15:26:36 +0530 Subject: [PATCH] Added validation for q param on Lucene syntax for get clients API --- management/organization_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/management/organization_test.go b/management/organization_test.go index 44d35ed4..d933c7b0 100644 --- a/management/organization_test.go +++ b/management/organization_test.go @@ -508,6 +508,10 @@ func TestOrganizationManager_ClientGrantsWithOrg(t *testing.T) { assert.Len(t, associatedGrants.ClientGrants, 1) assert.Equal(t, clientGrant.GetID(), associatedGrants.ClientGrants[0].GetID()) + clients, err := api.Client.List(context.Background(), Parameter("q", fmt.Sprintf("client_grant.organization_id:%s", org.GetID()))) + require.NoError(t, err) + assert.Equal(t, clients.Clients[0].GetClientID(), client.GetClientID()) + err = api.Organization.RemoveClientGrant(context.Background(), org.GetID(), clientGrant.GetID()) require.NoError(t, err)