Skip to content

Commit

Permalink
Merge pull request #391 from lipkau/fix/#390-FixedCreationOfSession
Browse files Browse the repository at this point in the history
Fixed route for creating session
  • Loading branch information
lipkau authored Nov 26, 2019
2 parents e01eff8 + 4669486 commit 0c081ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions JiraPS/Public/New-JiraSession.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ function New-JiraSession {
$Credential,

[Hashtable]
$Headers = @{}
$Headers = @{ }
)

begin {
Write-Verbose "[$($MyInvocation.MyCommand.Name)] Function started"

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/2/mypermissions"
$resourceURi = "$server/rest/api/2/myself"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functions/New-JiraSession.Unit.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Describe "New-JiraSession" -Tag 'Unit' {

Mock ConvertTo-JiraSession -ModuleName JiraPS { }

Mock Invoke-JiraMethod -ModuleName JiraPS -ParameterFilter {$Method -eq 'Get' -and $Uri -like "*/rest/api/*/mypermissions"} {
Mock Invoke-JiraMethod -ModuleName JiraPS -ParameterFilter { $Method -eq 'Get' -and $Uri -like "*/rest/api/*/myself" } {
ShowMockInfo 'Invoke-JiraMethod' 'Method', 'Uri'
New-Object -TypeName Microsoft.PowerShell.Commands.WebRequestSession
}
Expand Down

0 comments on commit 0c081ad

Please sign in to comment.