From 891126514701ed923ad86f8af21cfb27cef39d0e Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Tue, 20 Aug 2019 12:36:24 +0200 Subject: [PATCH 1/2] Added check for trailing `/` to be removed from `JiraServerUrl` closes #372 --- JiraPS/Public/Get-JiraConfigServer.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JiraPS/Public/Get-JiraConfigServer.ps1 b/JiraPS/Public/Get-JiraConfigServer.ps1 index 858821f0..1328fc22 100644 --- a/JiraPS/Public/Get-JiraConfigServer.ps1 +++ b/JiraPS/Public/Get-JiraConfigServer.ps1 @@ -12,7 +12,7 @@ function Get-JiraConfigServer { Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] ParameterSetName: $($PsCmdlet.ParameterSetName)" Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] PSBoundParameters: $($PSBoundParameters | Out-String)" - return $script:JiraServerUrl + return ($script:JiraServerUrl -replace "\/$", "") } end { From acf739eb8b278742c9c49736f9df352505f9a38b Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Tue, 20 Aug 2019 12:50:05 +0200 Subject: [PATCH 2/2] Fixed tests --- Tests/JiraPS.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/JiraPS.Tests.ps1 b/Tests/JiraPS.Tests.ps1 index 2be66545..810f341f 100644 --- a/Tests/JiraPS.Tests.ps1 +++ b/Tests/JiraPS.Tests.ps1 @@ -70,7 +70,7 @@ Describe "General project validation" -Tag Unit { Import-Module $env:BHManifestToTest -Force - Get-JiraConfigServer | Should -Be "https://example.com/" + Get-JiraConfigServer | Should -Be "https://example.com" } # It "module is imported with default prefix" {