diff --git a/avm/ptn/mgmt-groups/subscription-placement/pester/main.tests.ps1 b/avm/ptn/mgmt-groups/subscription-placement/pester/main.tests.ps1 new file mode 100644 index 0000000000..85e78c98c6 --- /dev/null +++ b/avm/ptn/mgmt-groups/subscription-placement/pester/main.tests.ps1 @@ -0,0 +1,31 @@ +param ( + [Parameter(Mandatory = $false)] + [hashtable] $TestInputData = @{} +) + +Describe 'Bicep Landing Zone (Sub) Vending Tests' { + + BeforeAll { + $subscriptionId = $TestInputData.DeploymentOutputs.createdSubId.Value + Update-AzConfig -DisplayBreakingChangeWarning $false + Select-AzSubscription -subscriptionId $subscriptionId + } + + Context 'Subscription Placement Tests' { + BeforeAll { + $subscriptionPlacementSummary = $TestInputData.DeploymentOutputs.subscriptionPlacementSummary.Value + } + + It 'Should have a Subscription Placement Summary' { + $subscriptionPlacementSummary | Should -Not -BeNullOrEmpty + } + + It 'Should contain the correct management group ID' { + $subscriptionPlacementSummary | Should -Contain 'test-mgmt-group' + } + + It 'Should contain the correct subscription ID' { + $subscriptionPlacementSummary | Should -Contain $subscriptionId + } + } +}