Skip to content

Commit 8e2667f

Browse files
Copilotjohlju
andcommitted
Fix Get-SqlDscLogin mock to return single object instead of array in Test-SqlDscIsLoginEnabled unit tests
Co-authored-by: johlju <[email protected]>
1 parent fa44379 commit 8e2667f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Unit/Public/Test-SqlDscIsLoginEnabled.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Describe 'Test-SqlDscIsLoginEnabled' -Tag 'Public' {
108108
$mockLoginObject.IsDisabled = $false
109109

110110
Mock -CommandName Get-SqlDscLogin -MockWith {
111-
return @($mockLoginObject)
111+
return $mockLoginObject
112112
}
113113
}
114114

@@ -129,7 +129,7 @@ Describe 'Test-SqlDscIsLoginEnabled' -Tag 'Public' {
129129
$mockLoginObject.IsDisabled = $true
130130

131131
Mock -CommandName Get-SqlDscLogin -MockWith {
132-
return @($mockLoginObject)
132+
return $mockLoginObject
133133
}
134134
}
135135

@@ -150,7 +150,7 @@ Describe 'Test-SqlDscIsLoginEnabled' -Tag 'Public' {
150150
$mockLoginObject.IsDisabled = $false
151151

152152
Mock -CommandName Get-SqlDscLogin -MockWith {
153-
return @($mockLoginObject)
153+
return $mockLoginObject
154154
}
155155
}
156156

0 commit comments

Comments
 (0)