Skip to content

Commit 0023635

Browse files
Fix gist test validating the since parameter (#321)
octocat recently updated all of its gists, starting on 2/24/2021. The test previously would query for gists that were updated since 2016, but as of 2/24/2021, that included all of them. The test has been made more robust by choosing the most recent date of all the gists and then requerying, which should hopefully now always guarantee that we'll get a reduced set of gists, unless all of the gists are suddenly updated in the future at the exact same second.
1 parent a2329d6 commit 0023635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/GitHubGists.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ try
238238
}
239239
}
240240

241-
$since = (Get-Date -Date '01/01/2016')
241+
$since = $gists.updated_At | Sort-Object | Select-Object -Last 1
242242
$sinceGists = Get-GitHubGist -UserName $username -Since $since
243243
It 'Should have fewer results with using the since parameter' {
244244
$sinceGists.Count | Should -BeGreaterThan 0

0 commit comments

Comments
 (0)