@@ -150,8 +150,7 @@ describe('copilot/identity-setup-prompt', () => {
150150
151151 it ( 'should render all template placeholders' , ( ) => {
152152 const prompt = generateIdentitySetupPrompt ( { environments : [ 'dev' , 'prod' ] } ) ;
153- expect ( prompt ) . not . toContain ( '{{' ) ;
154- expect ( prompt ) . not . toContain ( '}}' ) ;
153+ expect ( prompt ) . not . toMatch ( / \{ \{ [ ^ } ] + \} \} / ) ;
155154 } ) ;
156155
157156 it ( 'should generate Azure DevOps instructions when ciProvider is azure-devops' , ( ) => {
@@ -219,6 +218,15 @@ describe('copilot/identity-setup-prompt', () => {
219218 expect ( prompt ) . toContain ( 'for env in "${ENVIRONMENTS[@]}"; do' ) ;
220219 } ) ;
221220
221+ it ( 'should authorize environments for pipeline access in ADO prompt' , ( ) => {
222+ const prompt = generateIdentitySetupPrompt ( {
223+ environments : [ 'dev' , 'prod' ] ,
224+ ciProvider : 'azure-devops' ,
225+ } ) ;
226+ expect ( prompt ) . toContain ( 'pipelinePermissions/environment' ) ;
227+ expect ( prompt ) . toContain ( '"allPipelines":{"authorized":true}' ) ;
228+ } ) ;
229+
222230 it ( 'should render environment arrays for PowerShell and Git Bash in ADO prompt' , ( ) => {
223231 const prompt = generateIdentitySetupPrompt ( {
224232 environments : [ 'dev' , 'prod' ] ,
@@ -233,8 +241,7 @@ describe('copilot/identity-setup-prompt', () => {
233241 environments : [ 'dev' , 'prod' ] ,
234242 ciProvider : 'azure-devops' ,
235243 } ) ;
236- expect ( prompt ) . not . toContain ( '{{' ) ;
237- expect ( prompt ) . not . toContain ( '}}' ) ;
244+ expect ( prompt ) . not . toMatch ( / \{ \{ [ ^ } ] + \} \} / ) ;
238245 } ) ;
239246 } ) ;
240247} ) ;
0 commit comments