PowerShell/test/powershell/Modules/Microsoft.PowerShell.Management/ItemProperty.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

19 lines
976 B
PowerShell

Describe "Simple ItemProperty Tests" -Tag "CI" {
It "Can retrieve the PropertyValue with Get-ItemPropertyValue" {
Get-ItemPropertyValue -path $TESTDRIVE -Name Attributes | should be "Directory"
}
It "Can clear the PropertyValue with Clear-ItemProperty" {
setup -f file1.txt
Set-ItemProperty $TESTDRIVE/file1.txt -Name Attributes -Value ReadOnly
Get-ItemPropertyValue -path $TESTDRIVE/file1.txt -Name Attributes | should match "ReadOnly"
Clear-ItemProperty $TESTDRIVE/file1.txt -Name Attributes
Get-ItemPropertyValue -path $TESTDRIVE/file1.txt -Name Attributes | should not match "ReadOnly"
}
# these cmdlets are targeted at the windows registry, and don't have an linux equivalent
Context "Registry targeted cmdlets" {
It "Copy ItemProperty" -pending { }
It "Move ItemProperty" -pending { }
It "New ItemProperty" -pending { }
It "Rename ItemProperty" -pending { }
}
}