Skip to content

Commit

Permalink
Fix gist test validating the since parameter (#321)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HowardWolosky authored Mar 25, 2021
1 parent a2329d6 commit 0023635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/GitHubGists.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ try
}
}

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

0 comments on commit 0023635

Please sign in to comment.