Skip to content

Commit

Permalink
Merge branch 'pr/MichelZ/242'
Browse files Browse the repository at this point in the history
  • Loading branch information
DarqueWarrior committed Feb 25, 2020
2 parents 19632b2 + eaf5185 commit 5e83d41
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions unit/test/membership.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ InModuleScope VSTeam {
$result = Test-VSTeamMembership -MemberDescriptor $UserDescriptor -ContainerDescriptor $GroupDescriptor
It 'Should test membership' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
$Method -eq "Head"
$Method -eq "Head" -and
$Uri -like "https://vssps.dev.azure.com/test/_apis/graph/memberships/$UserDescriptor/$GroupDescriptor*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*"
}
Expand All @@ -37,7 +37,7 @@ InModuleScope VSTeam {
$null = Add-VSTeamMembership -MemberDescriptor $UserDescriptor -ContainerDescriptor $GroupDescriptor
It 'Should add membership' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
$Method -eq "Put"
$Method -eq "Put" -and
$Uri -like "https://vssps.dev.azure.com/test/_apis/graph/memberships/$UserDescriptor/$GroupDescriptor*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*"
}
Expand All @@ -53,7 +53,7 @@ InModuleScope VSTeam {
$null = Remove-VSTeamMembership -MemberDescriptor $UserDescriptor -ContainerDescriptor $GroupDescriptor -Force
It 'Should remove a membership' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
$Method -eq "Delete"
$Method -eq "Delete" -and
$Uri -like "https://vssps.dev.azure.com/test/_apis/graph/memberships/$UserDescriptor/$GroupDescriptor*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*"
}
Expand All @@ -71,7 +71,7 @@ InModuleScope VSTeam {
[VSTeamProjectCache]::timestamp = (Get-Date).Minute

Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
$Method -eq "Get"
$Method -eq "Get" -and
$Uri -like "https://vssps.dev.azure.com/test/_apis/graph/memberships/$MemberDescriptor*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*"
}
Expand All @@ -89,12 +89,12 @@ InModuleScope VSTeam {
[VSTeamProjectCache]::timestamp = (Get-Date).Minute

Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
$Method -eq "Get"
$Method -eq "Get" -and
$Uri -like "https://vssps.dev.azure.com/test/_apis/graph/memberships/$GroupDescriptor*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*"
$Uri -like "*api-version=$([VSTeamVersions]::Graph)*" -and
$Uri -like "*direction=Down*"
}
}
}
}
}
}

0 comments on commit 5e83d41

Please sign in to comment.