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
fixup! [Feature] Fix FunctionProvider test
  • Loading branch information
kwkam committed Jul 29, 2018
commit 61d10dd1e4ea14253c1ff184774193b4e663c5d4
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Describe "Basic Function Provider Tests" -Tags "CI" {
}

It "Fails to rename not existing function" {
{ Rename-Item $nonExistingFunction -NewName $newName -ErrorAction Stop } | ShouldBeErrorId "PathNotFound,Microsoft.PowerShell.Commands.RenameItemCommand"
{ Rename-Item $nonExistingFunction -NewName $newName -ErrorAction Stop } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.RenameItemCommand"
}

It "Fails to rename function which is Constant" {
Expand All @@ -114,7 +114,7 @@ Describe "Basic Function Provider Tests" -Tags "CI" {

It "Fails to rename function which is ReadOnly" {
Set-Item $nonExistingFunction -Options "ReadOnly" -Value $functionValue
{ Rename-Item $nonExistingFunction -NewName $newName -ErrorAction Stop } | ShouldBeErrorId "CannotRenameFunction,Microsoft.PowerShell.Commands.RenameItemCommand"
{ Rename-Item $nonExistingFunction -NewName $newName -ErrorAction Stop } | Should -Throw -ErrorId "CannotRenameFunction,Microsoft.PowerShell.Commands.RenameItemCommand"
}

It "Renames ReadOnly function when -Force parameter is on" {
Expand Down