Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Modules/TeamCity/TeamCity-Artifacts.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ Describe "New-TeamCityWebClientConnection" {

$connection.Credentials.UserName.should.match("teamcitysharpuser")
}

When "given connection details with credentials and Basic mode, Authorization header should be populated" {

$parameters = @{
ConnectionDetails = @{
ServerUrl = "teamcity.codebetter.com"
Credential = New-Object System.Management.Automation.PSCredential("teamcitysharpuser", (ConvertTo-SecureString "qwerty" -asplaintext -force))
UseSsl = $false
UseBasic = $true
}}

$connection = New-TeamCityWebClientConnection @parameters

$connection.Headers['Authorization'].should.match("dGVhbWNpdHlzaGFycHVzZXI6cXdlcnR5")
}
}

Describe "New-TeamCityUrl" {
Expand Down
Binary file modified Modules/TeamCity/TeamCity.psm1
Binary file not shown.