Functions/Get-MSPCompleteUserToAzureADUserPropertyMap.Tests.ps1

describe "BitTitan.Runbooks.MSPComplete/Get-MSPCompleteUserToAzureADUserPropertyMap" -Tags "module", "unit" {

    # Import the function to test
    . "$($PSScriptRoot)\Get-MSPCompleteUserToAzureADUserPropertyMap.ps1"

    it "returns the list of user extended properties mapped between MSPComplete and Azure AD" {
        # Call the function
        $output = Get-MSPCompleteUserToAzureADUserPropertyMap

        # Verify the output
        (@{
            FirstName           = "GivenName"
            LastName            = "Surname"
            DisplayName         = "DisplayName"
            PrimaryEmailAddress = "UserPrincipalName"
            UserPrincipalName   = "UserPrincipalName"
        }).GetEnumerator() | ForEach-Object -Process {
            $output.($_.Key) | Should Be $_.Value
        }
    }
}