Skip to content

Commit 1ae0ef4

Browse files
committed
Handle DefaultLanguage and DefaultFullTextLanguage properties in Test-SqlDscDatabaseProperty function
1 parent 2400860 commit 1ae0ef4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/Public/Test-SqlDscDatabaseProperty.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,16 @@ function Test-SqlDscDatabaseProperty
11661166
$expectedValue = $expectedValue.IsPresent
11671167
}
11681168

1169+
<#
1170+
Handle DefaultLanguage and DefaultFullTextLanguage properties.
1171+
These SMO properties return a DefaultLanguage object, but we accept
1172+
Int32 (LCID) as input. Compare against the Lcid property.
1173+
#>
1174+
if ($parameterName -in @('DefaultLanguage', 'DefaultFullTextLanguage') -and $null -ne $actualValue)
1175+
{
1176+
$actualValue = $actualValue.Lcid
1177+
}
1178+
11691179
# Use a robust comparison that handles empty strings, nulls, and different types
11701180
$valuesMatch = $false
11711181

0 commit comments

Comments
 (0)