@@ -18,6 +18,7 @@ describe("OAuth Client Usage", () => {
1818 postOauthClientUsageQuery : vi . fn ( ) ,
1919 getOauthClientUsageQueryResult : vi . fn ( ) ,
2020 } ,
21+ cache : undefined ,
2122 } ;
2223 const toolDefinition = oauthClientUsage ( toolDeps ) ;
2324 toolName = toolDefinition . schema . name ;
@@ -141,8 +142,6 @@ describe("OAuth Client Usage", () => {
141142 test ( "OAuth Client usage returned for date range" , async ( ) => {
142143 const oauthClientId = randomUUID ( ) ;
143144 const executionId = randomUUID ( ) ;
144- const organisationOneId = randomUUID ( ) ;
145- const organisationTwoId = randomUUID ( ) ;
146145
147146 toolDeps . oauthApi . postOauthClientUsageQuery . mockResolvedValue ( {
148147 executionId,
@@ -152,11 +151,13 @@ describe("OAuth Client Usage", () => {
152151 toolDeps . oauthApi . getOauthClientUsageQueryResult . mockResolvedValue ( {
153152 results : [
154153 {
155- organizationId : organisationOneId ,
154+ templateUri : "api/v2/authorization/divisions" ,
155+ httpMethod : "GET" ,
156156 requests : 5 ,
157157 } ,
158158 {
159- organizationId : organisationTwoId ,
159+ templateUri : "api/v2/authorization/roles" ,
160+ httpMethod : "GET" ,
160161 requests : 10 ,
161162 } ,
162163 ] ,
@@ -181,14 +182,14 @@ describe("OAuth Client Usage", () => {
181182 text : JSON . stringify ( {
182183 startDate,
183184 endDate,
184- totalRequest : 15 ,
185- requestsPerOrganisation : [
185+ totalRequests : 15 ,
186+ requestsPerEndpoint : [
186187 {
187- organisationId : organisationOneId ,
188+ endpoint : "GET api/v2/authorization/divisions" ,
188189 requests : 5 ,
189190 } ,
190191 {
191- organisationId : organisationTwoId ,
192+ endpoint : "GET api/v2/authorization/roles" ,
192193 requests : 10 ,
193194 } ,
194195 ] ,
0 commit comments