Skip to content

Commit 6a8f650

Browse files
committed
Added missing credential check to test
1 parent 6799064 commit 6a8f650

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Tests/Unit/MSFT_xScheduledTask.Tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ try
340340
ActionExecutable = "C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe"
341341
ScheduleType = "Minutes"
342342
RepeatInterval = 15
343+
ExecuteAsCredential = New-Object System.Management.Automation.PSCredential ("DEMO\RightUser", (ConvertTo-SecureString "ExamplePassword" -AsPlainText -Force))
343344
}
344345

345346
Mock Get-ScheduledTask { return @{
@@ -355,7 +356,7 @@ try
355356
}
356357
})
357358
Principal = @{
358-
UserId = "Brian"
359+
UserId = "WrongUser"
359360
}
360361
} }
361362

0 commit comments

Comments
 (0)