mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 14:36:48 +00:00
test: stop the start-menu restore specs sharing a restore copy (#801)
This commit is contained in:
@@ -9,6 +9,11 @@ BeforeAll {
|
||||
}
|
||||
|
||||
Describe 'Get-StartMenuUserNameFromPath' {
|
||||
BeforeEach {
|
||||
# Restore copies are named to the second; clear them so tests sharing $TestDrive cannot see each other's copy
|
||||
Get-ChildItem -LiteralPath $TestDrive -Filter 'Win11Debloat-StartRestore-*.bak' | Remove-Item -Force
|
||||
}
|
||||
|
||||
It 'extracts a user name from a start-menu path and falls back for unknown paths' {
|
||||
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Users\Alice\AppData\Local\Packages\Start\start2.bin' | Should -Be 'Alice'
|
||||
Get-StartMenuUserNameFromPath -StartMenuBinFile 'C:\Temp\start2.bin' | Should -Be 'unknown'
|
||||
|
||||
Reference in New Issue
Block a user