From 5a9b2d6b04fdf891efe0354556241976b071648f Mon Sep 17 00:00:00 2001 From: hmmwhatsthisdo <2093321+hmmwhatsthisdo@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:40:15 -0700 Subject: [PATCH] Remove unnecessary mock --- Tests/Functions/Set-JiraIssue.Unit.Tests.ps1 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Tests/Functions/Set-JiraIssue.Unit.Tests.ps1 b/Tests/Functions/Set-JiraIssue.Unit.Tests.ps1 index af29aa52..c94b3268 100644 --- a/Tests/Functions/Set-JiraIssue.Unit.Tests.ps1 +++ b/Tests/Functions/Set-JiraIssue.Unit.Tests.ps1 @@ -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*' }