Skip to content

Commit 0cc6a6d

Browse files
Merge pull request #110 from StartAutomating/Set-ADOTeam-Fix
Set-ADOTeam: Fixing teamfieldvalues parameter sets
2 parents 93ef5f2 + a13d7dd commit 0cc6a6d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

PSDevOps.tests.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,18 @@ describe 'Calling REST APIs' {
289289
$whatIf.uri | Should -BeLike '*/MyTeam*'
290290
$whatIf.Method | Should -Be DELETE
291291
}
292+
293+
it 'Can set team -DefaultAreaPath and -AreaPath' {
294+
$whatIf =
295+
Get-ADOTeam -Organization StartAutomating -Project PSDevOps -TeamID 'PSDevOps Team' -PersonalAccessToken $testPat |
296+
Set-ADOTeam -DefaultAreaPath "MyAreaPath" -WhatIf -AreaPath "An\AreaPath", "Another\AreaPath"
297+
298+
$whatIf.Method | Should -Be PATCH
299+
$whatIf.Uri | Should -BeLike '*teamFieldvalue*'
300+
$whatIf.Body.defaultValue | Should -Be MyAreaPath
301+
302+
303+
}
292304
}
293305

294306
context Repositories {

Set-ADOTeam.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727

2828
# The project.
2929
[Parameter(Mandatory,ParameterSetName='/{Organization}/{Project}/{Team}/_apis/work/teamsettings',ValueFromPipelineByPropertyName)]
30+
[Parameter(Mandatory,ParameterSetName='/{Organization}/{Project}/{Team}/_apis/work/teamsettings/teamfieldvalues',ValueFromPipelineByPropertyName)]
3031
[string]
3132
$Project,
3233

3334
# The team.
3435
[Parameter(Mandatory,ParameterSetName='/{Organization}/{Project}/{Team}/_apis/work/teamsettings',ValueFromPipelineByPropertyName)]
36+
[Parameter(Mandatory,ParameterSetName='/{Organization}/{Project}/{Team}/_apis/work/teamsettings/teamfieldvalues',ValueFromPipelineByPropertyName)]
3537
[string]
3638
$Team,
3739

0 commit comments

Comments
 (0)