diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 350c11b..6ec5177 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.2.2] + +- Fixed ```Send-TelegramPoll``` bug where Quiz mode answer could not specify first option correctly. +- Minor spelling corrections throughout +- Build/dev improvements + - Changed Pester configuration from static property to ```New-PesterConfiguration``` + - Updated VSCode tasks to no longer use legacy Pester parameters + - Bumped module versions to latest available + ## [2.2.0] - Added Protected Content parameter: diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index baf28a0..6e04c46 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -72,4 +72,4 @@ available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.h [homepage]: https://www.contributor-covenant.org -For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq) \ No newline at end of file +For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d80726e..e77ddf3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -48,4 +48,4 @@ This project has a [Code of Conduct](CODE_OF_CONDUCT.md). ## Licensing -See the [LICENSE](LICENSE.txt) file for our project's licensing. \ No newline at end of file +See the [LICENSE](LICENSE.txt) file for our project's licensing. diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 034fbd3..4a0a08e 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -21,6 +21,7 @@ assignees: '' ### Steps to Reproduce + 1. 2. 3. diff --git a/.vscode/settings.json b/.vscode/settings.json index 91f47c5..935056f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,22 +2,51 @@ "files.trimTrailingWhitespace": true, "powershell.codeFormatting.preset": "Stroustrup", "cSpell.words": [ + "Allman", + "backoff", + "botname", "buildspec", + "Catesta", + "channelusername", "cmdlets", "customlog", + "datetime", + "diagvresults", "geordi", + "getbytes", "getidsbot", + "Gifs", + "hashtable", + "jakemorrison", + "Janeway", "markdownv", + "Mycommand", + "Nausicaan", + "notmatch", + "OTBS", + "photourl", "poshgram", + "psobject", "pwsh", "riker", "shortcode", + "shortlink", + "shortlinks", + "slotmachine", + "Starfleet", "strikethrough", "Stroustrup", "Syndec", + "telegramx", "Tobu", "troi", + "videourl", "webp", + "wontfix", "worf" + ], + "cSpell.enableFiletypes": [ + "markdown", + "powershell" ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f8b34b1..8ef0a36 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -214,7 +214,7 @@ { "label": "Pester-Single-Coverage", "type": "shell", - "command": "Import-Module -Name '${workspaceFolder}/src/PoshGram/PoshGram.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Unit/${input:functionName}.Tests.ps1' -CodeCoverage '${workspaceFolder}/src/PoshGram/*/${input:functionName}.ps1'", + "command": "Import-Module -Name '${workspaceFolder}/src/PoshGram/PoshGram.psm1';$pesterConfiguration = New-PesterConfiguration;$pesterConfiguration.Run.Path = '${workspaceFolder}/src/Tests/Unit/${input:functionName}.Tests.ps1';$pesterConfiguration.CodeCoverage.Enabled = $true;$pesterConfiguration.CodeCoverage.Path = '${workspaceFolder}/src/PoshGram/*/${input:functionName}.ps1';Invoke-Pester -Configuration $pesterConfiguration", "problemMatcher": "$pester", "presentation": { "echo": false, @@ -236,7 +236,7 @@ { "label": "DevCC-Single", "type": "shell", - "command": "Import-Module -Name '${workspaceFolder}/src/PoshGram/PoshGram.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Unit/${input:functionName}.Tests.ps1' -CodeCoverage '${workspaceFolder}/src/PoshGram/*/${input:functionName}.ps1' -CodeCoverageOutputFile '${workspaceFolder}/cov.xml'", + "command": "Import-Module -Name '${workspaceFolder}/src/PoshGram/PoshGram.psm1'; $pesterConfiguration = New-PesterConfiguration;$pesterConfiguration.Run.Path = '${workspaceFolder}/src/Tests/Unit/${input:functionName}.Tests.ps1';$pesterConfiguration.CodeCoverage.Enabled = $true;$pesterConfiguration.CodeCoverage.Path = '${workspaceFolder}/src/PoshGram/*/${input:functionName}.ps1';$pesterConfiguration.CodeCoverage.OutputPath = '${workspaceFolder}/cov.xml';Invoke-Pester -Configuration $pesterConfiguration", "problemMatcher": "$pester", "presentation": { "echo": false, diff --git a/actions_bootstrap.ps1 b/actions_bootstrap.ps1 index 6af0298..069092e 100644 --- a/actions_bootstrap.ps1 +++ b/actions_bootstrap.ps1 @@ -15,12 +15,12 @@ $modulesToInstall = [System.Collections.ArrayList]::new() # https://github.com/pester/Pester $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' - ModuleVersion = '5.3.1' + ModuleVersion = '5.3.3' })) # https://github.com/nightroman/Invoke-Build $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' - ModuleVersion = '5.9.7' + ModuleVersion = '5.9.10' })) # https://github.com/PowerShell/PSScriptAnalyzer $null = $modulesToInstall.Add(([PSCustomObject]@{ @@ -56,4 +56,4 @@ foreach ($module in $modulesToInstall) { " - $message" throw $message } -} \ No newline at end of file +} diff --git a/docs/PoshGram-Sticker-Info.md b/docs/PoshGram-Sticker-Info.md index bcf5c31..c327294 100644 --- a/docs/PoshGram-Sticker-Info.md +++ b/docs/PoshGram-Sticker-Info.md @@ -40,4 +40,4 @@ You also provide the emoji shortcode of the emoji you are trying to convey. * Some sticker authors have the same emoji linked to multiple stickers * This method will make a best attempt to look up the sticker pack you specify and send a sticker that matches the corresponding emoji shortcode. -If you don't want to have a *best attempt* scenario, use ***Get-TelegramStickerPackInfo*** to determine the exact file_id's from the sticker pack you'd like to send. \ No newline at end of file +If you don't want to have a *best attempt* scenario, use ***Get-TelegramStickerPackInfo*** to determine the exact file_id's from the sticker pack you'd like to send. diff --git a/docs/PoshGram.md b/docs/PoshGram.md index 3657bda..c0c7a0c 100644 --- a/docs/PoshGram.md +++ b/docs/PoshGram.md @@ -2,13 +2,13 @@ Module Name: PoshGram Module Guid: 277b92bc-0ea9-4659-8f6c-ed5a1dfdfda2 Download Help Link: NA -Help Version: 2.2.0 +Help Version: 2.2.2 Locale: en-US --- # PoshGram Module ## Description -PoshGram provides functionality to send various message types to a specified Telegram chat via the Telegram Bot API. Seperate PowerShell functions are used for each message type. Checks are included to ensure that file extensions, and file size restrictions are adhered to based on Telegram requirements. +PoshGram provides functionality to send various message types to a specified Telegram chat via the Telegram Bot API. Separate PowerShell functions are used for each message type. Checks are included to ensure that file extensions, and file size restrictions are adhered to based on Telegram requirements. ## PoshGram Cmdlets ### [Get-TelegramStickerPackInfo](Get-TelegramStickerPackInfo.md) diff --git a/docs/Send-TelegramPoll.md b/docs/Send-TelegramPoll.md index d878254..f0536af 100644 --- a/docs/Send-TelegramPoll.md +++ b/docs/Send-TelegramPoll.md @@ -408,6 +408,10 @@ Use the BotFather https://t.me/BotFather Telegram currently supports questions 1-300 characters Telegram currently supports 2-10 options 1-100 characters each +Quiz answers are 0-based. +If the first answer is correct, the answer is 0. +If the second answer is correct, the answer is 1, etc. + ## RELATED LINKS [https://github.com/techthoughts2/PoshGram/blob/main/docs/Send-TelegramPoll.md](https://github.com/techthoughts2/PoshGram/blob/main/docs/Send-TelegramPoll.md) diff --git a/install_modules.ps1 b/install_modules.ps1 index 11cafd9..5eed9ec 100644 --- a/install_modules.ps1 +++ b/install_modules.ps1 @@ -7,7 +7,7 @@ need to specify each module and version that is required for installation. You also need to specify which version of that module should be installed. Additionally, you will need to specify the S3 bucket location where that module currently resides, so that it can be downloaded and installed into the build - container at runtime. This neccessitates that you download and upload your required modules to S3 prior to + container at runtime. This necessitates that you download and upload your required modules to S3 prior to the build being executed. .EXAMPLE Save-Module -Name Pester -RequiredVersion 4.4.5 -Path C:\RequiredModules @@ -30,13 +30,13 @@ $galleryDownload = $false # set to false to download from S3 $modulesToInstall = [System.Collections.ArrayList]::new() $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'Pester' - ModuleVersion = '5.3.1' + ModuleVersion = '5.3.3' BucketName = 'ps-invoke-modules' KeyPrefix = '' })) $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'InvokeBuild' - ModuleVersion = '5.9.7' + ModuleVersion = '5.9.10' BucketName = 'ps-invoke-modules' KeyPrefix = '' })) @@ -54,13 +54,13 @@ $null = $modulesToInstall.Add(([PSCustomObject]@{ })) $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'AWS.Tools.Common' - ModuleVersion = '4.1.30.0' + ModuleVersion = '4.1.98' BucketName = 'ps-invoke-modules' KeyPrefix = '' })) $null = $modulesToInstall.Add(([PSCustomObject]@{ ModuleName = 'AWS.Tools.SecretsManager' - ModuleVersion = '4.1.30.0' + ModuleVersion = '4.1.98' BucketName = 'ps-invoke-modules' KeyPrefix = '' })) diff --git a/src/PSScriptAnalyzerSettings.psd1 b/src/PSScriptAnalyzerSettings.psd1 index 387799a..57b3c35 100644 --- a/src/PSScriptAnalyzerSettings.psd1 +++ b/src/PSScriptAnalyzerSettings.psd1 @@ -4,7 +4,7 @@ IncludeDefaultRules = $true #________________________________________ #Severity - #Specify Severity when you want to limit generated diagnostic records to a sepecific subset: [ Error | Warning | Information ] + #Specify Severity when you want to limit generated diagnostic records to a specific subset: [ Error | Warning | Information ] Severity = @('Error', 'Warning') #________________________________________ #CustomRulePath diff --git a/src/PoshGram.build.ps1 b/src/PoshGram.build.ps1 index d69d4bd..8838810 100644 --- a/src/PoshGram.build.ps1 +++ b/src/PoshGram.build.ps1 @@ -257,7 +257,7 @@ Add-BuildTask Test { } if (Test-Path -Path $script:UnitTestsPath) { - $pesterConfiguration = [PesterConfiguration]::new() + $pesterConfiguration = New-PesterConfiguration $pesterConfiguration.run.Path = $script:UnitTestsPath $pesterConfiguration.Run.PassThru = $true $pesterConfiguration.Run.Exit = $false @@ -323,7 +323,7 @@ Add-BuildTask DevCC { Remove-Module -Name Pester -Force -ErrorAction SilentlyContinue # there are instances where some containers have Pester already in the session Import-Module -Name Pester -MinimumVersion $script:MinPesterVersion -MaximumVersion $script:MaxPesterVersion -ErrorAction 'Stop' - $pesterConfiguration = [PesterConfiguration]::new() + $pesterConfiguration = New-PesterConfiguration $pesterConfiguration.run.Path = $script:UnitTestsPath $pesterConfiguration.CodeCoverage.Enabled = $true $pesterConfiguration.CodeCoverage.Path = "$PSScriptRoot\$ModuleName\*\*.ps1" @@ -515,7 +515,7 @@ Add-BuildTask InfraTest { Write-Build White " Performing Pester Infrastructure Tests in $($invokePesterParams.path)" - $pesterConfiguration = [PesterConfiguration]::new() + $pesterConfiguration = New-PesterConfiguration $pesterConfiguration.run.Path = $script:InfraTestsPath $pesterConfiguration.Run.PassThru = $true $pesterConfiguration.Run.Exit = $false diff --git a/src/PoshGram/PoshGram.psd1 b/src/PoshGram/PoshGram.psd1 index fdc1fb9..6e25d59 100644 --- a/src/PoshGram/PoshGram.psd1 +++ b/src/PoshGram/PoshGram.psd1 @@ -12,7 +12,7 @@ RootModule = 'PoshGram.psm1' # Version number of this module. - ModuleVersion = '2.2.0' + ModuleVersion = '2.2.2' # Supported PSEditions # CompatiblePSEditions = @() @@ -30,7 +30,7 @@ Copyright = '(c) Jake Morrison. All rights reserved.' # Description of the functionality provided by this module - Description = 'PoshGram provides functionality to send various message types to a specified Telegram chat via the Telegram Bot API. Seperate PowerShell functions are used for each message type. Checks are included to ensure that file extensions, and file size restrictions are adhered to based on Telegram requirements.' + Description = 'PoshGram provides functionality to send various message types to a specified Telegram chat via the Telegram Bot API. Separate PowerShell functions are used for each message type. Checks are included to ensure that file extensions, and file size restrictions are adhered to based on Telegram requirements.' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '6.1.0' @@ -184,4 +184,4 @@ # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' -} \ No newline at end of file +} diff --git a/src/PoshGram/Private/Confirm-URL.ps1 b/src/PoshGram/Private/Confirm-URL.ps1 index 417467a..5e8272e 100644 --- a/src/PoshGram/Private/Confirm-URL.ps1 +++ b/src/PoshGram/Private/Confirm-URL.ps1 @@ -32,7 +32,7 @@ function Confirm-URL { Write-Verbose -Message 'Confirmed.' } #try_Invoke-WebRequest catch { - Write-Verbose -Message 'Catch on Invoke-WebRequest. This is not neccessarily a bad thing. Checking status code.' + Write-Verbose -Message 'Catch on Invoke-WebRequest. This is not necessarily a bad thing. Checking status code.' if ([int]$_.Exception.Response.StatusCode -eq 0) { Write-Warning -Message "$Uri" Write-Warning -Message 'The URL provided does not appear to be valid' diff --git a/src/PoshGram/Public/Send-TelegramMediaGroup.ps1 b/src/PoshGram/Public/Send-TelegramMediaGroup.ps1 index c18d312..0548b08 100644 --- a/src/PoshGram/Public/Send-TelegramMediaGroup.ps1 +++ b/src/PoshGram/Public/Send-TelegramMediaGroup.ps1 @@ -141,7 +141,7 @@ function Send-TelegramMediaGroup { throw 'Telegram media group requirements not met' } - Write-Verbose -Message 'Forming serialzied JSON for all media files...' + Write-Verbose -Message 'Forming serialized JSON for all media files...' $form = @{ chat_id = $ChatID; disable_notification = $DisableNotification.IsPresent diff --git a/src/PoshGram/Public/Send-TelegramPoll.ps1 b/src/PoshGram/Public/Send-TelegramPoll.ps1 index 09536b9..031e836 100644 --- a/src/PoshGram/Public/Send-TelegramPoll.ps1 +++ b/src/PoshGram/Public/Send-TelegramPoll.ps1 @@ -158,6 +158,8 @@ Telegram currently supports questions 1-300 characters Telegram currently supports 2-10 options 1-100 characters each + + Quiz answers are 0-based. If the first answer is correct, the answer is 0. If the second answer is correct, the answer is 1, etc. .COMPONENT PoshGram - https://github.com/techthoughts2/PoshGram .FUNCTIONALITY @@ -275,8 +277,9 @@ function Send-TelegramPoll { if ($PollType -eq 'quiz') { Write-Verbose -Message 'Processing quiz...' - if ($null -eq $QuizAnswer -or $QuizAnswer -lt 1 -or $QuizAnswer -gt 10) { - throw 'When PollType is quiz, you must supply a QuizAnswer desginator.' + Write-Verbose -Message ('Quiz answer: {0}' -f $QuizAnswer) + if (-not ($QuizAnswer -ge 0 -and $QuizAnswer -le 9)) { + throw 'When PollType is quiz, you must supply a QuizAnswer designator between 0-9.' } else { $Form += @{correct_option_id = $QuizAnswer } diff --git a/src/Tests/Unit/ExportedFunctions.Tests.ps1 b/src/Tests/Unit/ExportedFunctions.Tests.ps1 index c883708..e1ca2d8 100644 --- a/src/Tests/Unit/ExportedFunctions.Tests.ps1 +++ b/src/Tests/Unit/ExportedFunctions.Tests.ps1 @@ -23,7 +23,7 @@ Describe -Name $ModuleName -Fixture { Context -Name 'Exported Commands' -Fixture { Context -Name 'Number of commands' -Fixture { - It -Name 'Exports the same number of public funtions as what is listed in the Module Manifest' -Test { + It -Name 'Exports the same number of public functions as what is listed in the Module Manifest' -Test { $manifestExported.Count | Should -BeExactly $moduleExported.Count } } @@ -56,4 +56,4 @@ Describe -Name $ModuleName -Fixture { } } } -} \ No newline at end of file +} diff --git a/src/Tests/Unit/Public/Send-TelegramLocalAnimation.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalAnimation.Tests.ps1 index ce667cb..21b5b7f 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalAnimation.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalAnimation.Tests.ps1 @@ -78,7 +78,7 @@ InModuleScope PoshGram { { Send-TelegramLocalAnimation @sendTelegramLocalAnimationSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramLocalAudio.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalAudio.Tests.ps1 index c3af926..c447f7b 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalAudio.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalAudio.Tests.ps1 @@ -78,7 +78,7 @@ InModuleScope PoshGram { { Send-TelegramLocalAudio @sendTelegramLocalAudioSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramLocalDocument.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalDocument.Tests.ps1 index f7c1bae..ddc9ebc 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalDocument.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalDocument.Tests.ps1 @@ -66,7 +66,7 @@ InModuleScope PoshGram { { Send-TelegramLocalDocument @sendTelegramLocalDocumentSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramLocalPhoto.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalPhoto.Tests.ps1 index f061403..a60a425 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalPhoto.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalPhoto.Tests.ps1 @@ -77,7 +77,7 @@ InModuleScope PoshGram { { Send-TelegramLocalPhoto @sendTelegramLocalPhotoSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramLocalSticker.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalSticker.Tests.ps1 index 436cd8c..d5d0262 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalSticker.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalSticker.Tests.ps1 @@ -75,7 +75,7 @@ InModuleScope PoshGram { { Send-TelegramLocalSticker @sendTelegramLocalStickerSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramLocalVideo.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramLocalVideo.Tests.ps1 index ab220b8..9d1a4b8 100644 --- a/src/Tests/Unit/Public/Send-TelegramLocalVideo.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramLocalVideo.Tests.ps1 @@ -77,7 +77,7 @@ InModuleScope PoshGram { { Send-TelegramLocalVideo @sendTelegramLocalVideoSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramMediaGroup.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramMediaGroup.Tests.ps1 index 4e556b2..34d427d 100644 --- a/src/Tests/Unit/Public/Send-TelegramMediaGroup.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramMediaGroup.Tests.ps1 @@ -60,7 +60,7 @@ InModuleScope PoshGram { { Send-TelegramMediaGroup @sendTelegramMediaGroupSplat } | Should -Throw } #it - It 'should throw if it cannot successfuly get the file' { + It 'should throw if it cannot successfully get the file' { Mock Get-Item { throw 'Fake Error' } #endMock diff --git a/src/Tests/Unit/Public/Send-TelegramPoll.Tests.ps1 b/src/Tests/Unit/Public/Send-TelegramPoll.Tests.ps1 index a469220..91b5193 100644 --- a/src/Tests/Unit/Public/Send-TelegramPoll.Tests.ps1 +++ b/src/Tests/Unit/Public/Send-TelegramPoll.Tests.ps1 @@ -72,19 +72,6 @@ InModuleScope PoshGram { { Send-TelegramPoll @sendTelegramPollSplat } | Should -Throw } #it - It 'should throw if a quiz type poll is sent without a quiz answer' { - $sendTelegramPollSplat = @{ - BotToken = $token - ChatID = $chat - Question = $question - Options = $opt - DisableNotification = $true - ProtectContent = $true - PollType = 'quiz' - } - { Send-TelegramPoll @sendTelegramPollSplat } | Should -Throw - } #it - It 'should throw if a quiz type poll is sent with an out of bound quiz answer designator' { $sendTelegramPollSplat = @{ BotToken = $token @@ -225,7 +212,7 @@ InModuleScope PoshGram { $eval.ok | Should -Be 'True' } #it - It 'should return expected results if successfull with a quiz poll with additional options' { + It 'should return expected results if successful with a quiz poll with additional options' { $sendTelegramPollSplat = @{ BotToken = $token ChatID = $chat