Increase code coverage #22

Merged
OCram85 merged 34 commits from dev into master 2018-03-21 12:16:09 +01:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 0417ecd9f6 - Show all commits

View File

@ -73,9 +73,9 @@ Describe "New-CredentialStoreItem" {
}
}
Context "Test optional parameter lookup" {
$UserName = 'myUser'
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
Mock Get-Credential {
$UserName = 'testuser'
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
return [PSCredential]::new($UserName, $Password)
}
@ -83,7 +83,7 @@ Describe "New-CredentialStoreItem" {
$tmpCS = 'C:\CredentialStore.json'
New-CredentialStoreItem -Path $tmpCs -Shared -RemoteHost 'foobar3'
$writtenItem = Get-CredentialStoreItem -Path $tmpCS -Shared -RemoteHost 'foobar3'
$writtenItem.UserName | Should -Be "myUser"
$writtenItem.UserName | Should -Be "testuser"
}
}
Context "General Exception handling" {