Tests/Get-PDKGithubFileSha.ps1
# Import PesterHelper class . (Join-Path -Path $PSScriptRoot -ChildPath 'PesterHelper.class.ps1') # Load PesterHelper Environment $PesterHelper = [PesterHelper]::new() $PesterHelper.ImportModule() # Pester Tests Describe 'Test Get-PDKGithubFileSha' { It 'Should be get sha' { Mock Get-PDKGithubFileObject { [PSCustomObject]@{ sha = 'b6e935a9300d000d206fb4d3e46122928bcc7b27' } } Get-PDKGithubFileSha -FilePath 'Plan\DeathStar.pdf' -Owner 'dark-vador' -Repository 'Sith' | Should -Be "b6e935a9300d000d206fb4d3e46122928bcc7b27" } } # Unload PesterHelper $PesterHelper.RemoveModule() |