mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Test Snipeit-Connect
This commit is contained in:
parent
943a744acf
commit
5436239a8a
1 changed files with 13 additions and 11 deletions
|
|
@ -1,19 +1,21 @@
|
|||
|
||||
Describe 'Connect-SnipeitPS' {
|
||||
$SnipeitDev = 'https://develop.snipeitapp.com/'
|
||||
$SnipeitKey = 'UqddVx6SDb3HLw1Pmw1wGGYHA6w8wWQAiS9kg2xMcz5i75HOULaN3miqYvcPCvHpI2CBfuvdplI8QNm_XzFPmoQRu_5kR8knzla4'
|
||||
$SnipeitSecKey = ConvertTo-SecureString -Force -AsPlainText -String $SnipeitKey
|
||||
$SnipeSiteCred = New-Object -Type PSCredential -Argumentlist $SnipeitDev,$SnipeitSecKey
|
||||
Context "Connections" {
|
||||
$SnipeitDev = 'https://develop.snipeitapp.com/'
|
||||
$SnipeitKey = 'UqddVx6SDb3HLw1Pmw1wGGYHA6w8wWQAiS9kg2xMcz5i75HOULaN3miqYvcPCvHpI2CBfuvdplI8QNm_XzFPmoQRu_5kR8knzla4'
|
||||
$SnipeitSecKey = ConvertTo-SecureString -Force -AsPlainText -String $SnipeitKey
|
||||
$SnipeSiteCred = New-Object -Type PSCredential -Argumentlist $SnipeitDev,$SnipeitSecKey
|
||||
|
||||
It 'Should connect to api with url and api key' {
|
||||
Connect-SnipeitPS -url $SnipeitDev -apiKey $SnipeitKey | Should -Not Throw
|
||||
}
|
||||
It 'Should connect to api with url and api key' {
|
||||
Connect-SnipeitPS -url $SnipeitDev -apiKey $SnipeitKey | Should -Not Throw
|
||||
}
|
||||
|
||||
It 'Should connect to api with url and secureapi key' {
|
||||
Connect-SnipeitPS -url $SnipeitDev -secureApiKey $SnipeitSecKey | Should -Not Throw
|
||||
}
|
||||
It 'Should connect to api with url and secureapi key' {
|
||||
Connect-SnipeitPS -url $SnipeitDev -secureApiKey $SnipeitSecKey | Should -Not Throw
|
||||
}
|
||||
|
||||
It 'Should connect to api with siteCred' {
|
||||
It 'Should connect to api with siteCred' {
|
||||
Connect-SnipeitPS -siteCred $SnipeSiteCred | Should -Not Throw
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue