Skip to content

Commit a263b0d

Browse files
committed
Unskipping tests, fixing CommentId type
1 parent a547f0d commit a263b0d

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

GitHubGistComments.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ filter Get-GitHubGistComment
7171
[Parameter(ValueFromPipelineByPropertyName)]
7272
[Alias('GistCommentId')]
7373
[ValidateNotNullOrEmpty()]
74-
[string] $Comment,
74+
[int64] $Comment,
7575

7676
[ValidateSet('Raw', 'Text', 'Html', 'Full')]
77-
[string] $MediaType = 'Raw',
77+
[string] $MediaType = 'Full',
7878

7979
[string] $AccessToken,
8080

@@ -187,7 +187,7 @@ filter Remove-GitHubGistComment
187187
Position = 2)]
188188
[Alias('GistCommentId')]
189189
[ValidateNotNullOrEmpty()]
190-
[string] $Comment,
190+
[int64] $Comment,
191191

192192
[switch] $Force,
193193

@@ -371,7 +371,7 @@ filter Set-GitHubGistComment
371371
Position = 2)]
372372
[Alias('GistCommentId')]
373373
[ValidateNotNullOrEmpty()]
374-
[string] $Comment,
374+
[int64] $Comment,
375375

376376
[Parameter(
377377
Mandatory,

Tests/GitHubGists.tests.ps1

+8-6
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,10 @@ try
386386
$files | Remove-Item -Force -ErrorAction SilentlyContinue | Out-Null
387387
}
388388

389-
# Marking this test to skip. It works just fine, but takes 26 second to execute.
390-
# Not worth it for the moderate improvement to code coverage.
391-
It 'Should throw an exception because there are too many files' -Skip:(-not ([string]::IsNullOrEmpty($env:ciAccessToken))) {
389+
# May want to consider skipping this test.
390+
# It works just fine, but takes 26 second to execute.
391+
# (May not be worth it for the moderate improvement to code coverage.)
392+
It 'Should throw an exception because there are too many files' {
392393
$gist = $files | New-GitHubGist
393394
{ $gist | Get-GitHubGist -Path $tempPath -Force } | Should -Throw
394395
$gist | Remove-GitHubGist -Force
@@ -409,9 +410,10 @@ try
409410
Remove-Item -Force -ErrorAction SilentlyContinue | Out-Null
410411
}
411412

412-
# Marking this test to skip. It works just fine, but takes 82 second to execute.
413-
# Not worth it for the moderate improvement to code coverage.
414-
It 'Should throw an exception because the file is too large to download' -Skip:(-not ([string]::IsNullOrEmpty($env:ciAccessToken))) {
413+
# May want to consider skipping this test.
414+
# It works just fine, but takes 26 second to execute.
415+
# (May not be worth it for the moderate improvement to code coverage.)
416+
It 'Should throw an exception because the file is too large to download' {
415417
$gist = $tenMegFile | New-GitHubGist
416418
{ $gist | Get-GitHubGist -Path $tempPath -Force } | Should -Throw
417419
$gist | Remove-GitHubGist -Force

0 commit comments

Comments
 (0)