Skip to content

Commit 4cbad9a

Browse files
committed
Updated tests to reflect changes
1 parent f0927c4 commit 4cbad9a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Tests/ServiceNow.Tests.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Describe "ServiceNow-Module" {
3939
Remove-ServiceNowAuth
4040
}
4141

42+
# Validate Environment
43+
It "ServiceNow url has Test-Connection connectivity" {
44+
Test-Connection $Defaults.ServiceNowURL -Quiet | Should -Be $true
45+
}
46+
4247
# Auth Functions
4348
It "Test-ServiceNowAuthIsSet not set" {
4449
Test-ServiceNowAuthIsSet | Should -Be $false
@@ -61,7 +66,7 @@ Describe "ServiceNow-Module" {
6166
$getServiceNowTableSplat = @{
6267
Table = 'incident'
6368
Query = 'ORDERBYDESCopened_at'
64-
ServiceNowCredential = $Defaults.Creds
69+
Credential = $Defaults.Creds
6570
ServiceNowURL = $Defaults.ServiceNowURL
6671
}
6772
([array](Get-ServiceNowTable @getServiceNowTableSplat)).Count -gt 0 | Should -Match $true
@@ -119,7 +124,7 @@ Describe "ServiceNow-Module" {
119124

120125
# Update functions
121126
It "Update-ServiceNowChangeRequest works" {
122-
$TestTicket = Get-ServiceNowChangeRequest -Limit 1
127+
$TestTicket = Get-ServiceNowChangeRequest -First 1
123128

124129
$Values = @{
125130
description = 'Pester Comment: Update-ServiceNowChangeRequest works'
@@ -243,7 +248,7 @@ Describe "ServiceNow-Module" {
243248

244249
# Remove Functions
245250
It "Remove-ServiceNowTable works" {
246-
$TestTicket = Get-ServiceNowIncident -Limit 1
251+
$TestTicket = Get-ServiceNowIncident -First 1
247252
$removeServiceNowTableEntrySplat = @{
248253
SysId = $TestTicket.sys_id
249254
Table = 'incident'

0 commit comments

Comments
 (0)