diff --git a/tests/GitHub.Tests.ps1 b/tests/GitHub.Tests.ps1 index 609cda90..2068dcf2 100644 --- a/tests/GitHub.Tests.ps1 +++ b/tests/GitHub.Tests.ps1 @@ -23,11 +23,11 @@ Describe 'GitHub' { 'X-GitHub-Api-Version' = Get-GitHubConfig -Name ApiVersion } + $AccessToken = Get-GitHubConfig -Name AccessToken $encryptedString = $AccessToken | ConvertFrom-SecureString $secureStringRecovered = $encryptedString | ConvertTo-SecureString $token = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureStringRecovered)) - $AccessToken = Get-GitHubConfig -Name AccessToken if ($AccessToken) { $headers['Authorization'] = "Bearer $token" }