Skip to content

Commit

Permalink
Tests - added assert calls
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Apr 5, 2021
1 parent 64d14e2 commit 4dbe545
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/functions/secrets/Search-Secret.ps1
Expand Up @@ -286,7 +286,6 @@ function Search-Secret {

if ($restResponse.records) {
foreach ($secret in $restResponse.records) {

if (-not $restResponse.lastPasswordChangeAttempt) {
$secret.lastPasswordChangeAttempt = [datetime]::MinValue
}
Expand Down
3 changes: 3 additions & 0 deletions tests/secrets/Set-SecretField.Tests.ps1
Expand Up @@ -50,5 +50,8 @@ Describe "$commandName functions" {
It "Should be empty" {
$object | Should -BeNullOrEmpty
}
It "Should have called Invoke-RestMethod 2 times" {
Assert-MockCalled -CommandName Invoke-RestMethod -Times 2 -Scope Describe
}
}
}
3 changes: 3 additions & 0 deletions tests/secrets/Set-SecretSecurity.Tests.ps1
Expand Up @@ -51,5 +51,8 @@ Describe "$commandName functions" {
It "Should be empty" {
$object | Should -BeNullOrEmpty
}
It "Should have called Invoke-RestMethod 2 times" {
Assert-MockCalled -CommandName Invoke-RestMethod -Times 2 -Scope Describe
}
}
}

0 comments on commit 4dbe545

Please sign in to comment.