Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for connecting to GitHub App installations
Browse files Browse the repository at this point in the history
MariusStorhaug committed Dec 6, 2024
1 parent 8332079 commit aa128c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/GitHub.Tests.ps1
Original file line number Diff line number Diff line change
@@ -66,6 +66,16 @@ Describe 'GitHub' {
$app | Should -Not -BeNullOrEmpty
}

It 'Can connect to a GitHub App Installation' {
{ Connect-GitHubApp -Organization 'PSModule' } | Should -Not -Throw
Write-Verbose (Get-GitHubContext | Out-String) -Verbose
}

It 'Can connect to all GitHub App Installations' {
{ Connect-GitHubApp } | Should -Not -Throw
Write-Verbose (Get-GitHubContext | Out-String) -Verbose
}

It 'Can swap context to another' {
{ Set-GitHubDefaultContext -Context 'github.com/github-actions/PSModule' } | Should -Not -Throw
Get-GitHubConfig -Name 'DefaultContext' | Should -Be 'github.com/github-actions/PSModule'

0 comments on commit aa128c1

Please sign in to comment.