Skip to content

Commit 3aa7730

Browse files
committed
Add tests and update changelog
1 parent 50529c9 commit 3aa7730

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8-
### Added
9-
- Initial release of AzResourceGraph module.
8+
### Fixed
9+
- Fixed Auth problems
10+
11+
## [0.1.1] - 2025-05-14
1012

1113
### Changed
1214
- Removed space from tags in module manifest
15+
16+
## [0.1.0] - 2025-05-14
17+
18+
### Added
19+
- Initial release of AzResourceGraph module.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BeforeAll {
2+
Import-Module -FullyQualifiedName "$PSScriptRoot/../../../output/module/AzResourceGraph"
3+
}
4+
5+
Describe 'Disconnect-AzResourceGraph' {
6+
InModuleScope 'AzResourceGraph' {
7+
BeforeEach {
8+
# Mock the Get-AzToken function to avoid actual authentication
9+
Mock 'Get-AzToken' {
10+
@{
11+
Token = 'dummy'
12+
ExpiresOn = [System.DateTimeOffset]::Now.AddHours(1)
13+
Claims = @{
14+
aud = 'myApp'
15+
}
16+
}
17+
}
18+
}
19+
Context 'Successful token removal' {
20+
It 'Resets any token information' {
21+
Connect-AzResourceGraph
22+
Disconnect-AzResourceGraph
23+
$script:TokenSplat.Keys.Count | Should -be 0
24+
$null -eq $script:CertificatePath | Should -be $true
25+
$null -eq $script:Token | Should -be $true
26+
}
27+
}
28+
29+
}
30+
}

0 commit comments

Comments
 (0)