From 77d0b2da21fc3f758683b73bee8f1d449cdbb1d7 Mon Sep 17 00:00:00 2001 From: Igor Abade Date: Mon, 5 Aug 2024 23:41:57 -0300 Subject: [PATCH] Update tests --- PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1 b/PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1 index d1ad6846..c425ef97 100644 --- a/PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1 +++ b/PS/_Tests/WorkItem/GetTfsWorkItem.Tests.ps1 @@ -1,4 +1,4 @@ -& "$($PSScriptRoot.Split('_Tests')[0])/_Tests/_TestSetup.ps1" +& "$(($PSScriptRoot -split '_Tests')[0])/_Tests/_TestSetup.ps1" Describe (($MyInvocation.MyCommand.Name -split '\.')[-3]) { @@ -6,17 +6,17 @@ Describe (($MyInvocation.MyCommand.Name -split '\.')[-3]) { 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 }