Another mop up commit to add missing changes from the last mop-up.

This commit is contained in:
Shady Ibraheem
2019-12-13 09:48:00 -05:00
parent 95d3c31f21
commit 1dcd276b1e
188 changed files with 7333 additions and 7393 deletions

View File

@@ -1,34 +1,34 @@
. $PSScriptRoot\..\PathHelpers.ps1
Describe 'Test-MachinePath Tests' {
Mock Get-MachinePath {return "C:\foo;C:\bar"}
It 'Path contains item' {
Test-MachinePath -PathItem "C:\foo" | Should Be $true
}
It 'Path does not containe item' {
Test-MachinePath -PathItem "C:\baz" | Should Be $false
}
}
Describe 'Set-MachinePath Tests' {
Mock Get-MachinePath {return "C:\foo;C:\bar"}
Mock Set-ItemProperty {return}
It 'Set-MachinePath should return new path' {
Set-MachinePath -NewPath "C:\baz" | Should Be "C:\baz"
}
}
Describe "Add-MachinePathItem Tests"{
Mock Get-MachinePath {return "C:\foo;C:\bar"}
Mock Set-ItemProperty {return}
It 'Add-MachinePathItem should return complete path' {
Add-MachinePathItem -PathItem 'C:\baz' | Should Be 'C:\baz;C:\foo;C:\bar'
}
}
Describe 'Set-SystemVariable Tests' {
Mock Set-ItemProperty {return}
It 'Set-SystemVariable should return new path' {
Set-SystemVariable -SystemVariable "NewPathVar" -Value "C:\baz" | Should Be "C:\baz"
}
}
. $PSScriptRoot\..\PathHelpers.ps1
Describe 'Test-MachinePath Tests' {
Mock Get-MachinePath {return "C:\foo;C:\bar"}
It 'Path contains item' {
Test-MachinePath -PathItem "C:\foo" | Should Be $true
}
It 'Path does not containe item' {
Test-MachinePath -PathItem "C:\baz" | Should Be $false
}
}
Describe 'Set-MachinePath Tests' {
Mock Get-MachinePath {return "C:\foo;C:\bar"}
Mock Set-ItemProperty {return}
It 'Set-MachinePath should return new path' {
Set-MachinePath -NewPath "C:\baz" | Should Be "C:\baz"
}
}
Describe "Add-MachinePathItem Tests"{
Mock Get-MachinePath {return "C:\foo;C:\bar"}
Mock Set-ItemProperty {return}
It 'Add-MachinePathItem should return complete path' {
Add-MachinePathItem -PathItem 'C:\baz' | Should Be 'C:\baz;C:\foo;C:\bar'
}
}
Describe 'Set-SystemVariable Tests' {
Mock Set-ItemProperty {return}
It 'Set-SystemVariable should return new path' {
Set-SystemVariable -SystemVariable "NewPathVar" -Value "C:\baz" | Should Be "C:\baz"
}
}