Skip to content

Commit

Permalink
Merge pull request #18 from replicaJunction/dev
Browse files Browse the repository at this point in the history
Hotfix to fix Set-JiraIssue
  • Loading branch information
replicaJunction committed Dec 11, 2015
2 parents 8f4f1df + ee69bba commit 94c344b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions PSJira/Functions/Set-JiraIssue.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ InModuleScope PSJira {
'ID' = $Field;
}
}
{ Set-JiraIssue -Issue TEST-001 -Fields @{'customfield_12345'='foo'; 'customfield_67890'='bar'} } | Should Not Throw
{ 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 PSJira -Times 1 -Scope It -ParameterFilter { $Method -eq 'Put' -and $URI -like '*/rest/api/2/issue/12345' -and $Body -like '*customfield_12345*set*foo*' }
Assert-MockCalled -CommandName Invoke-JiraMethod -ModuleName PSJira -Times 1 -Scope It -ParameterFilter { $Method -eq 'Put' -and $URI -like '*/rest/api/2/issue/12345' -and $Body -like '*customfield_67890*set*bar*' }
}
Assert-MockCalled -CommandName Invoke-JiraMethod -ModuleName PSJira -Times 1 -Scope It -ParameterFilter { $Method -eq 'Put' -and $URI -like '*/rest/api/2/issue/12345' -and $Body -like '*customfield_111222*set*foobar*' }
}

}

Context "Input testing" {
Expand Down
2 changes: 1 addition & 1 deletion PSJira/Functions/Set-JiraIssue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function Set-JiraIssue
Write-Debug "[Set-JiraIssue] IssueProps: [$issueProps]"

Write-Debug "[Set-JiraIssue] Converting results to JSON"
$json = ConvertTo-Json -InputObject $issueProps -Depth 3
$json = ConvertTo-Json -InputObject $issueProps -Depth 5
$issueObjURL = $issueObj.RestUrl

Write-Debug "[Set-JiraIssue] Preparing for blastoff!"
Expand Down

0 comments on commit 94c344b

Please sign in to comment.