@@ -150,11 +150,14 @@ describe('Bitbucket server selector adapters', () => {
150150 expect ( mockFetch ) . toHaveBeenCalledTimes ( 1 )
151151 } )
152152
153- it ( 'resolves a workspace UUID before listing its repositories' , async ( ) => {
154- const workspaceUuid = '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
153+ it . each ( [
154+ [ 'braced' , '{a15fb181-db1f-48f7-b41f-e1eff06929d6}' ] ,
155+ [ 'unbraced' , 'a15fb181-db1f-48f7-b41f-e1eff06929d6' ] ,
156+ ] ) ( 'resolves a %s workspace UUID before listing its repositories' , async ( _ , workspaceUuid ) => {
157+ const providerUuid = '{a15fb181-db1f-48f7-b41f-e1eff06929d6}'
155158 mockFetch
156159 . mockResolvedValueOnce (
157- providerResponse ( { slug : 'acme-platform' , uuid : workspaceUuid , name : 'Acme' } )
160+ providerResponse ( { slug : 'acme-platform' , uuid : providerUuid , name : 'Acme' } )
158161 )
159162 . mockResolvedValueOnce ( providerResponse ( { values : [ ] } ) )
160163
@@ -167,7 +170,7 @@ describe('Bitbucket server selector adapters', () => {
167170 ) . resolves . toEqual ( { kind : 'list' , items : [ ] } )
168171
169172 expect ( new URL ( String ( mockFetch . mock . calls [ 0 ] ?. [ 0 ] ) ) . pathname ) . toBe (
170- `/2.0/workspaces/${ encodeURIComponent ( workspaceUuid ) } `
173+ `/2.0/workspaces/${ encodeURIComponent ( providerUuid ) } `
171174 )
172175 expect ( new URL ( String ( mockFetch . mock . calls [ 1 ] ?. [ 0 ] ) ) . pathname ) . toBe (
173176 '/2.0/repositories/acme-platform'
0 commit comments