tests/Unit/Private/Get-Downloader.tests.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
InModuleScope Chocolatey {
    Describe Get-Downloader {

        Context 'Default' {
            $Result = Get-Downloader -url https://chocolatey.org/api/v2
            It 'Should Return a downloader object' {
                $result | Should not BeNullOrEmpty
            }
            It 'Should be of type System.Net.WebClient' {
                $result | should beOfType [System.Net.WebClient]
            }
        }
    }
}