Skip to content

Commit 0b7c82b

Browse files
committed
Update PagerDays property values in Set-SqlDscAgentOperator tests for accuracy
1 parent ce104cb commit 0b7c82b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/Unit/Public/Set-SqlDscAgentOperator.Tests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ Describe 'Set-SqlDscAgentOperator' -Tag 'Public' {
238238
}
239239
@{
240240
PropertyName = 'PagerDays'
241-
PropertyValue = [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::Saturday -bor [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::Sunday
242-
Parameters = @{ PagerDays = [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::Saturday -bor [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::Sunday }
241+
PropertyValue = 64 -bor 1 # Saturday and Sunday
242+
Parameters = @{ PagerDays = 64 -bor 1 } # Saturday and Sunday
243243
}
244244
@{
245245
PropertyName = 'SaturdayPagerEndTime'
@@ -274,7 +274,7 @@ Describe 'Set-SqlDscAgentOperator' -Tag 'Public' {
274274
) {
275275
# Reset counter and set initial values
276276
$script:mockMethodAlterCallCount = 0
277-
277+
278278
# Set different initial values to ensure the property is actually being updated
279279
switch ($PropertyName) {
280280
'EmailAddress' { $script:mockOperator.EmailAddress = 'old@contoso.com' }
@@ -334,7 +334,7 @@ Describe 'Set-SqlDscAgentOperator' -Tag 'Public' {
334334
CategoryName = 'DatabaseAdmins'
335335
NetSendAddress = 'SQLSERVER01'
336336
PagerAddress = '555-999-8888'
337-
PagerDays = [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::AllDays
337+
PagerDays = [Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::EveryDay
338338
SaturdayPagerStartTime = [System.TimeSpan]::new(10, 0, 0)
339339
SaturdayPagerEndTime = [System.TimeSpan]::new(20, 0, 0)
340340
SundayPagerStartTime = [System.TimeSpan]::new(11, 0, 0)
@@ -353,7 +353,7 @@ Describe 'Set-SqlDscAgentOperator' -Tag 'Public' {
353353
$script:mockOperator.CategoryName | Should -Be 'DatabaseAdmins'
354354
$script:mockOperator.NetSendAddress | Should -Be 'SQLSERVER01'
355355
$script:mockOperator.PagerAddress | Should -Be '555-999-8888'
356-
$script:mockOperator.PagerDays | Should -Be ([Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::AllDays)
356+
$script:mockOperator.PagerDays | Should -Be ([Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::EveryDay)
357357
$script:mockOperator.SaturdayPagerStartTime | Should -Be ([System.TimeSpan]::new(10, 0, 0))
358358
$script:mockOperator.SaturdayPagerEndTime | Should -Be ([System.TimeSpan]::new(20, 0, 0))
359359
$script:mockOperator.SundayPagerStartTime | Should -Be ([System.TimeSpan]::new(11, 0, 0))
@@ -470,7 +470,7 @@ Describe 'Set-SqlDscAgentOperator' -Tag 'Public' {
470470
) {
471471
# Reset counter and set initial values
472472
$script:mockMethodAlterCallCount = 0
473-
473+
474474
# Set different initial values to ensure the property is actually being updated
475475
switch ($PropertyName) {
476476
'EmailAddress' { $script:mockOperator.EmailAddress = 'old@contoso.com' }

0 commit comments

Comments
 (0)