mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-11-26 07:26:18 +01:00
Improve backup validation (#849)
This commit is contained in:
@@ -15,6 +15,7 @@ Describe 'Test-RegistryBackupMatchesSelectedFeatures' {
|
||||
ApplyFeature = [PSCustomObject]@{ RegistryKey = 'apply.reg'; RegistryUndoKey = 'undo.reg' }
|
||||
}
|
||||
$script:CapturePlanCalls = [System.Collections.Generic.List[bool]]::new()
|
||||
Mock Get-RegistryBackupTrustedValueMap { @{} }
|
||||
Mock Get-RegistryBackupCapturePlans {
|
||||
param($SelectedRegistryFeatures, $UndoRegistryFeatures, $UseSysprepRegFiles)
|
||||
$script:CapturePlanCalls.Add([bool]$UseSysprepRegFiles)
|
||||
@@ -30,6 +31,7 @@ Describe 'Test-RegistryBackupMatchesSelectedFeatures' {
|
||||
It 'derives an allow list from selected features and accepts a matching snapshot' {
|
||||
$snapshot = [PSCustomObject]@{
|
||||
Path = 'HKEY_CURRENT_USER\Software\Example'
|
||||
Exists = $true
|
||||
Values = @([PSCustomObject]@{ Name = 'Enabled'; Exists = $true; Kind = 'DWord'; Data = 1 })
|
||||
SubKeys = @()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user