8000 Fix status test · PoshCode/PSGit@6cab071 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6cab071

Browse files
committed
Fix status test
1 parent 2b685c1 commit 6cab071

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Tests/Status.Steps.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if(!(git config --get user.email)) {
77
BeforeEachScenario {
88
$script:repo = Convert-Path TestDrive:/
99
Push-Location TestDrive:/
10+
Remove-Item ../git.log -ErrorAction SilentlyContinue
1011
[Environment]::CurrentDirectory = $repo
1112
Remove-Item TestDrive:/* -Recurse -Force -ErrorAction SilentlyContinue
1213
}
@@ -70,14 +71,14 @@ function global:ProcessGitActions($table) {
7071

7172
git push
7273

73-
} 2>>../git.log
74+
} -ErrorAction SilentlyContinue 2>>../git.log
7475
}
7576
"Branched" {
7677
&{[CmdletBinding()]param()
7778

7879
git checkout -b $change.Name
7980

80-
} 2>>../git.log
81+
} -ErrorAction SilentlyContinue 2>>../git.log
8182
}
8283
"Reset" {
8384
git reset --hard $change.Name
@@ -398,12 +399,12 @@ Then "the status of git should be" {
398399

399400
for($f =0; $f -lt $Result.Count; $f++) {
400401
# Staged | Change | Path
401-
$R = $Result[$f]
402+
$R = $Result[$f] | Select-Object Staged, Changed, @{N="Path";E={$_.Path.Trim("\/")}}
402403
$T = $Table[$f]
403404
if($T.OldPath) {
404405
$R | Must OldPath -eq $T.OldPath
405406
}
406-
$R | Must Path -eq ($T.Path.ToString().Trim("\/"))
407+
$R | Must Path -eq $T.Path
407408
$R | Must Staged -eq ($T.Staged -eq "True")
408409
$R | Must Change -eq $T.Change
409410

0 commit comments

Comments
 (0)
0