-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #929 from dataplat/fixes-912
unit tests and correct variable - fixes #912
- Loading branch information
Showing
3 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
Describe "Export-DbcConfig Unit Tests" -Tags "IntegrationTests" { | ||
Context "Command executes properly and returns proper info" { | ||
BeforeAll { | ||
$localapp = Get-DbcConfigValue -Name 'app.localapp' | ||
Remove-Item "$localapp\config.json" -ErrorAction SilentlyContinue | ||
Export-DbcConfig -Path 'TestDrive:\config.json' | ||
} | ||
AfterAll { | ||
Remove-Item "$localapp\config.json" -ErrorAction SilentlyContinue | ||
} | ||
It "Should not throw" { | ||
{ Export-DbcConfig } | Should -Not -Throw | ||
} | ||
|
||
It "outputs default file without errors" { | ||
(Get-ChildItem "$localapp\config.json" -ErrorAction SilentlyContinue) -ne $null | Should -BeTrue | ||
} | ||
|
||
It "outputs a named file without errors" { | ||
Test-Path 'TestDrive:\config.json' | Should -BeTrue | ||
} | ||
|
||
It "outputs an object" { | ||
$o = Export-DbcConfig -Force | ||
$o | Get-Member -Name Open | Should -Not -BeNullOrEmpty | ||
} | ||
} | ||
} |