Where should I place these variables

This commit is contained in:
Petri Asikainen 2021-09-06 06:28:32 +03:00
parent 41c5f5d9f9
commit dd2fc82af2

View file

@ -1,10 +1,10 @@
$script:SnipeitDev = 'https://develop.snipeitapp.com/'
$script:SnipeitKey = 'UqddVx6SDb3HLw1Pmw1wGGYHA6w8wWQAiS9kg2xMcz5i75HOULaN3miqYvcPCvHpI2CBfuvdplI8QNm_XzFPmoQRu_5kR8knzla4'
$script:SnipeitSecKey = ConvertTo-SecureString -Force -AsPlainText -String $SnipeitKey
$script:SnipeSiteCred = New-Object -Type PSCredential -Argumentlist $SnipeitDev,$SnipeitSecKey
Describe 'Connect-SnipeitPS' {
Context "Connections" {
$script:SnipeitDev = 'https://develop.snipeitapp.com/'
$script:SnipeitKey = 'UqddVx6SDb3HLw1Pmw1wGGYHA6w8wWQAiS9kg2xMcz5i75HOULaN3miqYvcPCvHpI2CBfuvdplI8QNm_XzFPmoQRu_5kR8knzla4'
$script:SnipeitSecKey = ConvertTo-SecureString -Force -AsPlainText -String $SnipeitKey
$script:SnipeSiteCred = New-Object -Type PSCredential -Argumentlist $SnipeitDev,$SnipeitSecKey
It 'Should connect to api with url and api key' {
Connect-SnipeitPS -url $script:SnipeitDev -apiKey $script:SnipeitKey | Should -Not Throw