Last active
April 19, 2019 01:48
-
-
Save dustindortch/4c084295fe361a1a516c4868f020630e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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