Functions/Get-MSPCompleteUserToGSuiteUserPropertyMap.Tests.ps1

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

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

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

        # Verify the output
        (@{
                FirstName           = "name.givenName"
                LastName            = "name.familyName"
                DisplayName         = "name.fullName"
                FullName            = "name.fullName"
                PrimaryEmailAddress = "PrimaryEmail"
                UserPrincipalName   = "PrimaryEmail"
            }).GetEnumerator() | ForEach-Object -Process {
            $output.($_.Key) | Should Be $_.Value
        }
    }
}