@@ -17,6 +17,10 @@ describe('createProject', () => {
1717 } ) ;
1818
1919 it ( 'should pass creating a project using default branchdir' , async ( ) => {
20+ const GITHUB_BASE_REF = process . env . GITHUB_BASE_REF ;
21+ process . env . GITHUB_BASE_REF = '' ;
22+ const GITHUB_REF_NAME = process . env . GITHUB_REF_NAME ;
23+ process . env . GITHUB_REF_NAME = '' ;
2024 putSpy . mockResolvedValue ( '' ) ;
2125
2226 await createProject ( ) ;
@@ -32,6 +36,8 @@ describe('createProject', () => {
3236 renameTo : { branchName : 'main' }
3337 } )
3438 ) ;
39+ process . env . GITHUB_BASE_REF = GITHUB_BASE_REF ;
40+ process . env . GITHUB_BASE_REF = GITHUB_REF_NAME ;
3541 } ) ;
3642
3743 it ( 'should pass creating a project using branchname given by input' , async ( ) => {
@@ -79,7 +85,7 @@ describe('createProject', () => {
7985 const GITHUB_BASE_REF = process . env . GITHUB_BASE_REF ;
8086 process . env . GITHUB_BASE_REF = '' ;
8187 const GITHUB_REF_NAME = process . env . GITHUB_REF_NAME ;
82- process . env . GITHUB_REF_NAME = 'branch ' ;
88+ process . env . GITHUB_REF_NAME = 'branches ' ;
8389 putSpy . mockResolvedValue ( '' ) ;
8490
8591 await createProject ( ) ;
@@ -88,11 +94,11 @@ describe('createProject', () => {
8894 'http://base.url/api/public/v1/fapi/Project' ,
8995 JSON . stringify ( {
9096 projectName : '' ,
91- branchName : 'branch ' ,
97+ branchName : 'branches ' ,
9298 branchDir : '' ,
9399 calculate : true ,
94100 visible : true ,
95- renameTo : { branchName : 'branch ' }
101+ renameTo : { branchName : 'branches ' }
96102 } )
97103 ) ;
98104 process . env . GITHUB_BASE_REF = GITHUB_BASE_REF ;
0 commit comments