adds extra tests for Resolve-Dependency

This commit is contained in:
OCram85 2018-03-09 09:11:14 +01:00
parent e05b853bf4
commit 9062bd1d4f

View File

@ -30,4 +30,15 @@ Describe "Resolve-Dependency" {
Resolve-Dependency -Name 'foobar2000' | Should -BeOfType bool
}
}
Context "Enforce Error" {
# Return incorrect module base to enforce there is no config file.
Mock Get-ModuleBase {return "C:\"}
It "Missing dependency file should not cause an error" {
{ Resolve-Dependency -Name 'awesome'} | Should -Not -Throw
}
It "Missing dependency file should return false" {
Resolve-Dependency -Name 'awesome' | Should -Be $false
}
}
}