mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-20 21:10:20 +08:00
32 lines
1.2 KiB
PowerShell
32 lines
1.2 KiB
PowerShell
BeforeAll {
|
|
$rebootFeatureLabelsScriptPath = Join-Path $PSScriptRoot '..\Scripts\Helpers\Get-RebootFeatureLabels.ps1'
|
|
. $rebootFeatureLabelsScriptPath
|
|
}
|
|
|
|
Describe 'Get-RebootFeatureLabels' {
|
|
BeforeEach {
|
|
$script:Params = @{
|
|
ApplyFeature = $true
|
|
NoRebootFeature = $true
|
|
}
|
|
$script:UndoParams = @{
|
|
UndoFeature = $true
|
|
ApplyFeature = $true
|
|
}
|
|
$script:Features = @{
|
|
ApplyFeature = [PSCustomObject]@{ RequiresReboot = $true; Label = 'Apply feature'; UndoLabel = 'Undo apply feature' }
|
|
UndoFeature = [PSCustomObject]@{ RequiresReboot = $true; Label = 'Undoable feature'; UndoLabel = 'Undo feature' }
|
|
NoRebootFeature = [PSCustomObject]@{ RequiresReboot = $false; Label = 'No reboot'; UndoLabel = 'Undo no reboot' }
|
|
}
|
|
}
|
|
|
|
It 'includes reboot-required selections once and uses undo labels for undo operations' {
|
|
$result = @(Get-RebootFeatureLabels)
|
|
|
|
$result | Should -HaveCount 2
|
|
$result | Should -Contain 'Undo apply feature'
|
|
$result | Should -Contain 'Undo feature'
|
|
$result | Should -Not -Contain 'No reboot'
|
|
}
|
|
}
|