tests/NetworkCleanup.Tests.ps1
|
$moduleRoot = Split-Path -Parent $PSScriptRoot Import-Module (Join-Path $moduleRoot 'Octa.psd1') -Force Describe 'Invoke-OctaNetworkCleanup' { It 'dry-run never mutates network state and returns real counts' { { Invoke-OctaNetworkCleanup } | Should Not Throw $result = Invoke-OctaNetworkCleanup $result.DnsCacheCount | Should BeGreaterThan -1 $result.ArpEntryCount | Should BeGreaterThan -1 } It 'reports NotFound for a Wi-Fi profile that does not exist, without touching real profiles' { $result = Invoke-OctaNetworkCleanup -RemoveWifiProfile 'ThisWifiProfileDoesNotExist12345' $result.Status | Should Be 'NotFound' } } |