Tests/Unit/Show-Remote.Tests.ps1

# Generated by tools\Build-PublicUnitTests.ps1. Re-run to regenerate.
BeforeAll {

$ProjectRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
$ModulePath  = Join-Path $ProjectRoot 'GitEasy.psd1'
}

Describe 'Show-Remote (unit contract)' {

    BeforeAll {
        Remove-Module GitEasy -Force -ErrorAction SilentlyContinue
        Import-Module $ModulePath -Force
    }

    It 'is exported by the GitEasy module' {
        @(Get-Command -Module GitEasy -Name 'Show-Remote').Count | Should -Be 1
    }

    It 'has CmdletBinding' {
        $cmd = Get-Command 'Show-Remote'
        $cmd.CmdletBinding | Should -Be $true
    }

    It 'has a non-empty .SYNOPSIS' {
        $help = Get-Help 'Show-Remote' -ErrorAction SilentlyContinue
        $help.Synopsis | Should -Not -BeNullOrEmpty
    }

    It 'has at least one .EXAMPLE in CBH' {
        $help = Get-Help 'Show-Remote' -Full -ErrorAction SilentlyContinue
        @($help.examples.example).Count -gt 0 | Should -Be $true
    }
}