11Describe " parse_input_paths" {
2+ BeforeEach{
3+ function toGitHub () {
4+ param (
5+ $output_name ,
6+ $output_value
7+ )
8+ Write-Output " $output_name =$output_value " ;
9+ }
10+ Mock toGitHub - MockWith { Write-Output " $output_name =$output_value " ;}
11+ }
12+
213 Context " when workspace, mapping, work not set" {
314 It " it should return gitworkspace" {
415 $githubWorkSpace = ' @github_work_space'
516 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace | Should - Be `
6- " ::set-output name= workspace_path:: github_work_space" , `
7- " ::set-output name= mapping_path:: github_work_space" , `
8- " ::set-output name= work_path:: github_work_space"
17+ " workspace_path= github_work_space" , `
18+ " mapping_path= github_work_space" , `
19+ " work_path= github_work_space"
920 }
1021 }
1122
@@ -14,9 +25,9 @@ Describe "parse_input_paths" {
1425 $githubWorkSpace = ' @github_work_space'
1526 $workSpace = ' @work_space'
1627 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - workspacePath $workSpace | Should - Be `
17- " ::set-output name= workspace_path:: work_space" , `
18- " ::set-output name= mapping_path:: work_space" , `
19- " ::set-output name= work_path:: work_space"
28+ " workspace_path= work_space" , `
29+ " mapping_path= work_space" , `
30+ " work_path= work_space"
2031 }
2132 }
2233
@@ -26,9 +37,9 @@ Describe "parse_input_paths" {
2637 $workSpace = ' @work_space'
2738 $mapping = ' @mapping'
2839 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - workspacePath $workSpace - mappingPath $mapping | Should - Be `
29- " ::set-output name= workspace_path:: work_space" , `
30- " ::set-output name= mapping_path:: mapping" , `
31- " ::set-output name= work_path:: mapping"
40+ " workspace_path= work_space" , `
41+ " mapping_path= mapping" , `
42+ " work_path= mapping"
3243 }
3344 }
3445
@@ -39,9 +50,9 @@ Describe "parse_input_paths" {
3950 $mapping = ' @mapping'
4051 $work = ' @work'
4152 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - workspacePath $workSpace - mappingPath $mapping - workPath $work | Should - Be `
42- " ::set-output name= workspace_path:: work_space" , `
43- " ::set-output name= mapping_path:: mapping" , `
44- " ::set-output name= work_path:: work"
53+ " workspace_path= work_space" , `
54+ " mapping_path= mapping" , `
55+ " work_path= work"
4556 }
4657 }
4758
@@ -51,9 +62,9 @@ Describe "parse_input_paths" {
5162 $workSpace = ' @work_space'
5263 $work = ' @work'
5364 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - workspacePath $workSpace - workPath $work | Should - Be `
54- " ::set-output name= workspace_path:: work_space" , `
55- " ::set-output name= mapping_path:: work_space" , `
56- " ::set-output name= work_path:: work"
65+ " workspace_path= work_space" , `
66+ " mapping_path= work_space" , `
67+ " work_path= work"
5768 }
5869 }
5970
@@ -63,9 +74,9 @@ Describe "parse_input_paths" {
6374 $mapping = ' @mapping'
6475 $work = ' @work'
6576 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - mappingPath $mapping - workPath $work | Should - Be `
66- " ::set-output name= workspace_path:: github_work_space" , `
67- " ::set-output name= mapping_path:: mapping" , `
68- " ::set-output name= work_path:: work"
77+ " workspace_path= github_work_space" , `
78+ " mapping_path= mapping" , `
79+ " work_path= work"
6980 }
7081 }
7182
@@ -74,9 +85,9 @@ Describe "parse_input_paths" {
7485 $githubWorkSpace = ' @github_work_space'
7586 $mapping = ' @mapping'
7687 .\parse_input_paths.ps1 - githubWorkSpace $githubWorkSpace - mappingPath $mapping | Should - Be `
77- " ::set-output name= workspace_path:: github_work_space" , `
78- " ::set-output name= mapping_path:: mapping" , `
79- " ::set-output name= work_path:: mapping"
88+ " workspace_path= github_work_space" , `
89+ " mapping_path= mapping" , `
90+ " work_path= mapping"
8091 }
8192 }
8293}
0 commit comments