Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
igoravl committed Aug 6, 2024
1 parent d7a7014 commit 77d0b2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
& "$($PSScriptRoot.Split('_Tests')[0])/_Tests/_TestSetup.ps1"
& "$(($PSScriptRoot -split '_Tests')[0])/_Tests/_TestSetup.ps1"

Describe (($MyInvocation.MyCommand.Name -split '\.')[-3]) {

Context 'Integration Tests' {

It 'Should get by ID and revision' {
(Get-TfsWorkItem -ID 150).Id | Should -Be 150
(Get-TfsWorkItem -ID 150).Rev | Should -Be 4
(Get-TfsWorkItem -ID 150).Rev | Should -Be 6
(Get-TfsWorkItem -ID 150 -Revision 2).Rev | Should -Be 2
}

It 'Should get by Where' {
(Get-TfsWorkItem -Where '[System.Id] = 150').Id | Should -Be 150
(Get-TfsWorkItem -Where '[System.Id] = 150').Rev | Should -Be 4
(Get-TfsWorkItem -Where '[System.Id] = 150').Rev | Should -Be 6
}

It 'Should support ASOF when getting by ID' {
(Get-TfsWorkItem 150 -AsOf (Get-Date)).Rev | Should -Be 4
(Get-TfsWorkItem 150 -AsOf (Get-Date)).Rev | Should -Be 6
(Get-TfsWorkItem 150 -AsOf (Get-Date '2022-01-21')).Rev | Should -Be 3
}

Expand Down

0 comments on commit 77d0b2d

Please sign in to comment.