mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
Test cleanup
This commit is contained in:
parent
5550d29864
commit
1f98253f12
2 changed files with 8 additions and 7 deletions
|
|
@ -341,7 +341,6 @@ Describe -Name "DCIM Devices Tests" -Tag 'DCIM', 'Devices' -Fixture {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Context -Name "New-NetboxDCIMDevice" -Fixture {
|
Context -Name "New-NetboxDCIMDevice" -Fixture {
|
||||||
It "Should create a new device" {
|
It "Should create a new device" {
|
||||||
$Result = New-NetboxDCIMDevice -Name "newdevice" -Device_Role 4 -Device_Type 10 -Site 1 -Face 0
|
$Result = New-NetboxDCIMDevice -Name "newdevice" -Device_Role 4 -Device_Type 10 -Site 1 -Face 0
|
||||||
|
|
|
||||||
|
|
@ -124,12 +124,6 @@ Describe -Name "DCIM Interfaces Tests" -Tag 'DCIM', 'Interfaces' -Fixture {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Mock -CommandName "Get-NetboxDCIMInterface" -ModuleName "NetboxPS" -MockWith {
|
|
||||||
return [pscustomobject]@{
|
|
||||||
'Id' = $Id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Context -Name "Add-NetboxDCIMInterface" -Fixture {
|
Context -Name "Add-NetboxDCIMInterface" -Fixture {
|
||||||
It "Should add a basic interface to a device" {
|
It "Should add a basic interface to a device" {
|
||||||
$Result = Add-NetboxDCIMInterface -Device 111 -Name "TestInterface"
|
$Result = Add-NetboxDCIMInterface -Device 111 -Name "TestInterface"
|
||||||
|
|
@ -190,6 +184,13 @@ Describe -Name "DCIM Interfaces Tests" -Tag 'DCIM', 'Interfaces' -Fixture {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Mock -CommandName "Get-NetboxDCIMInterface" -ModuleName "NetboxPS" -MockWith {
|
||||||
|
return [pscustomobject]@{
|
||||||
|
'Id' = $Id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Context -Name "Set-NetboxDCIMInterface" -Fixture {
|
Context -Name "Set-NetboxDCIMInterface" -Fixture {
|
||||||
It "Should set an interface to a new name" {
|
It "Should set an interface to a new name" {
|
||||||
$Result = Set-NetboxDCIMInterface -Id 123 -Name "TestInterface"
|
$Result = Set-NetboxDCIMInterface -Id 123 -Name "TestInterface"
|
||||||
|
|
@ -297,6 +298,7 @@ Describe -Name "DCIM Interfaces Tests" -Tag 'DCIM', 'Interfaces' -Fixture {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Context -Name "Get-NetboxDCIMInterfaceConnection" -Fixture {
|
Context -Name "Get-NetboxDCIMInterfaceConnection" -Fixture {
|
||||||
It "Should request the default number of interface connections" {
|
It "Should request the default number of interface connections" {
|
||||||
$Result = Get-NetboxDCIMInterfaceConnection
|
$Result = Get-NetboxDCIMInterfaceConnection
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue