From cd56f495c008c562f6c9a16df356944e8cf31fbe Mon Sep 17 00:00:00 2001 From: Raimund Andree Date: Fri, 9 Oct 2026 14:43:08 +0000 Subject: [PATCH] test: assert that disposing an access token handle closes it Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant --- Tests/Privileges.Tests.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/Privileges.Tests.ps1 b/Tests/Privileges.Tests.ps1 index b47ef99..7dd4fc5 100644 --- a/Tests/Privileges.Tests.ps1 +++ b/Tests/Privileges.Tests.ps1 @@ -346,6 +346,8 @@ Describe 'The PrivilegeEnabler class' { finally { $handle.Dispose() } + + $handle.IsClosed | Should -BeTrue } # The access tokens of administrators don't hold the privilege to create a token, and those of basic users don't hold