You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Tests/ansible.inventory.Tests.Ps1
+73-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
2
2
#region Header
3
3
4
+
Import-Module Pester -RequiredVersion 4.9.0
5
+
4
6
$TestsPath=Split-Path$MyInvocation.MyCommand.Path
5
7
6
8
$RootFolder= (get-item$TestsPath).Parent
@@ -660,7 +662,7 @@ three.example.com
660
662
}
661
663
662
664
# Test that the empty childgroups are not shown as null, but as an empty json array ("[]") if output type is 'json' fixing issue https://github.com/Stephanevg/psansible.inventory/issues/15
663
-
It '[AnsibleInventory] --> Export() : - should return correct inventory structure in json' {
665
+
It '[AnsibleInventory] --> Export() : - should return empty child attribute as array in json' {
664
666
# Arrange
665
667
$Instance=New-AnsibleInventory
666
668
$Instance.SetPath($TestDrive)
@@ -677,6 +679,76 @@ three.example.com
677
679
$result.Parent.children.GetType().BaseType.Name | Should -Be "Array"
678
680
}
679
681
682
+
It '[AnsibleInventory] --> Export() : - should return one child attribute as array in json' {
0 commit comments