From 7c6a0ce2f1ce7af6533af058b68ada2c9329d9f9 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Mon, 11 Jul 2016 22:22:45 -0700 Subject: [PATCH] New-Item tests to use Should Match --- .../Microsoft.PowerShell.Management/New-Item.Tests.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 index 3955e788b..2b51c50f4 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1 @@ -111,9 +111,8 @@ Describe "New-Item" { New-Item -ItemType SymbolicLink -Target $FullyQualifiedFile -Name $testlink -Path $tmpDirectory Test-Path $FullyQualifiedLink | Should Be $true - $target = $FullyQualifiedFile $fileInfo = Get-ChildItem $FullyQualifiedLink - $fileInfo.Target | Should Be $target + $fileInfo.Target | Should Match $FullyQualifiedFile $fileInfo.LinkType | Should Be "SymbolicLink" } @@ -136,7 +135,7 @@ Describe "New-Item" { Test-Path $FullyQualifiedLink | Should Be $true $fileInfo = Get-ChildItem $FullyQualifiedLink - $fileInfo.Target | Should Be $FullyQualifiedFolder + $fileInfo.Target | Should Match $FullyQualifiedFolder $fileInfo.LinkType | Should Be "SymbolicLink" # Remove the link explicitly to avoid broken symlink issue