Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix casing of cmdlet, pester operators.
  • Loading branch information
stknohg committed Jan 24, 2018
commit 7ea25512b9b14227ecf6b226c16a866b21bfd405
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ Describe "Set-Date" -Tag "CI" {
}

It "Set-Date should be able to set the date in an elevated context" -Skip:(! $IsElevated) {
{ get-date | set-date } | Should not throw
{ Get-Date | Set-Date } | Should Not Throw
}

It "Set-Date should be able to set the date with -Date parameter" -Skip:(! $IsElevated) {
$target = Get-Date
$expected = $target
Set-Date -Date $target | Should be $expected
Set-Date -Date $target | Should Be $expected
}

It "Set-Date should produce an error in a non-elevated context" -Skip:($IsElevated) {
{ get-date | set-date} | should throw
$Error[0].FullyQualifiedErrorId | should be "System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.SetDateCommand"
{ Get-Date | Set-Date } | Should Throw
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK😄

$Error[0].FullyQualifiedErrorId | Should Be "System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.SetDateCommand"
}
}