Skip to content

Commit

Permalink
#191 Extra tabs are removed from GetIshEvent pester tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian Taghva Manesh committed May 24, 2024
1 parent 5550c80 commit b7c41f1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ Describe "Get-IshEvent" -Tags "Create" {
$ishEvent.IshField.Count -ge 20 | Should -Be $true # Perhaps expected 10 Progress level fields, but Get-IshEvent currently always retrieves details as well
}
It "Parameter RequestedMetadata PipelineObjectPreference=PSObjectNoteProperty" {
$ishSession.PipelineObjectPreference | Should -Be "PSObjectNoteProperty"
$ishEvent = (Get-IshEvent -IshSession $ishSession -ModifiedSince ((Get-Date).AddMinutes(-10)) -UserFilter All -RequestedMetadata $allMetadata)[0]
$ishEvent.GetType().Name | Should -BeExactly "IshEvent" # and not PSObject
[bool]($ishEvent.PSobject.Properties.name -match "status") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "userid") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "modificationdate") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "status_detail_value") | Should -Be $true
$ishEvent.modificationdate -like "*/*" | Should -Be $false # It should be sortable date format: yyyy-MM-ddTHH:mm:ss
$ishSession.PipelineObjectPreference | Should -Be "PSObjectNoteProperty"
$ishEvent = (Get-IshEvent -IshSession $ishSession -ModifiedSince ((Get-Date).AddMinutes(-10)) -UserFilter All -RequestedMetadata $allMetadata)[0]
$ishEvent.GetType().Name | Should -BeExactly "IshEvent" # and not PSObject
[bool]($ishEvent.PSobject.Properties.name -match "status") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "userid") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "modificationdate") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "status_detail_value") | Should -Be $true
$ishEvent.modificationdate -like "*/*" | Should -Be $false # It should be sortable date format: yyyy-MM-ddTHH:mm:ss
}
It "Parameter RequestedMetadata PipelineObjectPreference=Off" {
$pipelineObjectPreference = $ishSession.PipelineObjectPreference
Expand Down

0 comments on commit b7c41f1

Please sign in to comment.