Skip to content

Commit

Permalink
Fix: Fix -Pull test in Generate-GitBranches.Tests.ps1 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh authored Feb 4, 2025
1 parent 7d2d626 commit 563fef2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Generate-GitBranches.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Describe "Generate-GitBranches.ps1" {

$games = Get-Content $PSScriptRoot/games.json -Encoding utf8 | ConvertFrom-Json -AsHashtable
$remote = 'origin'
$remoteUrl = git remote get-url $

$expectedFiles = @(
'.env'
Expand All @@ -20,6 +19,17 @@ Describe "Generate-GitBranches.ps1" {
'notify.sh'
'update/Dockerfile'
)
$expectedRemoteFiles = @(
'.env'
'.gitignore'
'.gitlab-ci.yml'
'.state'
'.trigger'
'build.sh'
'build/Dockerfile'
'notify.sh'
'update/Dockerfile'
)
}

AfterEach {
Expand Down Expand Up @@ -83,7 +93,7 @@ Describe "Generate-GitBranches.ps1" {
$branches = git branch | % { $_.Replace('*', '').Trim() } | ? { $_ -match '^steam-' }
$branches.Count | Should -Be 1
foreach ($b in $branches) {
git ls-tree -r --name-only $b | Should -Be $expectedFiles
git ls-tree -r --name-only $b | Should -Be $expectedRemoteFiles
}
}
}
Expand Down

0 comments on commit 563fef2

Please sign in to comment.