Skip to content

Commit

Permalink
Fix test for Remove-DbaDbSynonym (#9510)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjordan authored Oct 14, 2024
1 parent 0c8fbf9 commit f0423f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Remove-DbaDbSynonym.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" {
$null = New-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname -Synonym 'syn3' -BaseObject 'obj3'
$null = New-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname -Synonym 'syn4' -BaseObject 'obj4'
$result3 = Get-DbaDbSynonym -SqlInstance $script:instance2 -Synonym 'syn3','syn4'
Remove-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname1 -Synonym 'syn3','syn4' -Confirm:$false
$result4 = Get-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname1
Remove-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname -Synonym 'syn3','syn4' -Confirm:$false
$result4 = Get-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname

$result3.Count | Should BeGreaterThan $result4.Count
$result4.Name | Should -Not -Contain 'syn3'
Expand Down Expand Up @@ -109,7 +109,7 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" {
$null = New-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname2 -Synonym 'syn16' -BaseObject 'obj15' -Schema 'dbo'
$result15 = Get-DbaDbSynonym -SqlInstance $script:instance2
Remove-DbaDbSynonym -SqlInstance $script:instance2 -Schema 'sch3', 'dbo' -Confirm:$false
$result16 = Get-DbaDbSynonym -SqlInstance $script:instance2 -Database $dbname1
$result16 = Get-DbaDbSynonym -SqlInstance $script:instance2

$result15.Count | Should BeGreaterThan $result16.Count
$result16.Schema | Should -Not -Contain 'sch3'
Expand Down

0 comments on commit f0423f5

Please sign in to comment.