Skip to content

Commit

Permalink
Remove unnecessary mock
Browse files Browse the repository at this point in the history
  • Loading branch information
hmmwhatsthisdo committed Aug 13, 2024
1 parent 141c466 commit 5a9b2d6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Tests/Functions/Set-JiraIssue.Unit.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ Describe "Set-JiraIssue" -Tag 'Unit' {
}

It "Updates custom fields if provided to the -Fields parameter" {
Mock Get-JiraField {
[PSCustomObject] @{
'Name' = $Field
'ID' = $Field
}
}
{ Set-JiraIssue -Issue TEST-001 -Fields @{'customfield_12345' = 'foo'; 'customfield_67890' = 'bar'; 'customfield_111222' = @(@{'value' = 'foobar'})} } | Should Not Throw
Assert-MockCalled -CommandName Invoke-JiraMethod -ModuleName JiraPS -Times 1 -Scope It -ParameterFilter { $Method -eq 'Put' -and $URI -like "$jiraServer/rest/api/*/issue/12345" -and $Body -like '*customfield_12345*set*foo*' }
Assert-MockCalled -CommandName Invoke-JiraMethod -ModuleName JiraPS -Times 1 -Scope It -ParameterFilter { $Method -eq 'Put' -and $URI -like "$jiraServer/rest/api/*/issue/12345" -and $Body -like '*customfield_67890*set*bar*' }
Expand Down

0 comments on commit 5a9b2d6

Please sign in to comment.