Skip to content

Commit bada001

Browse files
fix typo
1 parent f58f3f1 commit bada001

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.ps1

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -345,40 +345,6 @@ function Test-RaDeletionByScope
345345
VerifyRoleAssignmentDeleted $newAssignment
346346
}
347347

348-
<#
349-
.SYNOPSIS
350-
Tests verifies creation and deletion of a RoleAssignments by Scope irrespective of the case
351-
#>
352-
function Test-RaDeletionByScope
353-
{
354-
# Setup
355-
$definitionName = 'Reader'
356-
$users = Get-AzureRmADUser | Select-Object -First 1 -Wait
357-
$subscription = Get-AzureRmSubscription
358-
$resourceGroups = Get-AzureRmResourceGroup | Select-Object -Last 1 -Wait
359-
$scope = '/subscriptions/'+ $subscription[0].Id +'/resourceGroups/' + $resourceGroups[0].ResourceGroupName
360-
Assert-AreEqual 1 $users.Count "There should be at least one user to run the test."
361-
362-
# Test
363-
[Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("fa1a4d3b-2cca-406b-8956-6b6b32377641")
364-
$newAssignment = New-AzureRmRoleAssignment `
365-
-ObjectId $users[0].Id.Guid `
366-
-RoleDefinitionName $definitionName `
367-
-Scope $scope
368-
$newAssignment.Scope = $scope.toUpper()
369-
370-
# cleanup
371-
DeleteRoleAssignment $newAssignment
372-
373-
# Assert
374-
Assert-NotNull $newAssignment
375-
Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName
376-
Assert-AreEqual $scope $newAssignment.Scope
377-
Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName
378-
379-
VerifyRoleAssignmentDeleted $newAssignment
380-
}
381-
382348
<#
383349
.SYNOPSIS
384350
Tests verifies creation and deletion of a RoleAssignments by Scope irrespective of the case

0 commit comments

Comments
 (0)