# Pester testing | |
## Prep work | |
## Depends - Pester, AzureADPreview, and xAzureAD.DirectorySettings modules | |
## Get original values - Get-AzureADDirectorySetting -Name Group.Unified | Export-Csv <Path> -NoTypeInformation | |
$ExpectedSettings = Import-Csv <Path> | |
Describe 'Azure AD Group Creation Settings' { | |
$ActualSettings = Get-AzureADDirectorySetting -Name Group.Unified | |
ForEach ($Setting in $ExpectedSettings) { | |
It "has the expected setting $($Setting.Name)" { | |
($ActualSettings | Where-Object {$_.Name -eq $Setting.Name}).Value | Should Be ($ExpectedSettings | Where-Object {$_.Name -eq $Setting.name}).Value | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment