PowerShell/test/powershell/Modules/Microsoft.PowerShell.Management/Rename-Item.Tests.ps1
James Truher 9d1c998287 Filling test gaps (issue 2022) - this replaces PR 1834
This replaces PR 1834 from the private fork I had
2016-08-22 14:56:04 -07:00

14 lines
503 B
PowerShell

Describe "Rename-Item tests" -Tag "CI" {
BeforeAll {
$content = "This is content"
Setup -f originalFile.txt -content "This is content"
$source = "$TESTDRIVE/originalFile.txt"
$target = "$TESTDRIVE/ItemWhichHasBeenRenamed.txt"
}
It "Rename-Item will rename a file" {
Rename-Item $source $target
test-path $source | Should be $false
test-path $target | Should be $true
"$target" | Should ContainExactly "This is content"
}
}