Skip to content

Commit

Permalink
Issue-dsccommunity#333 Moved Get-TargetResource in same "It" block as…
Browse files Browse the repository at this point in the history
… Set-TargetResource
  • Loading branch information
Rob-S committed Jun 17, 2020
1 parent 2ba9fff commit 995b3f4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/Unit/DSC_ScheduledTask.Tests.ps1
Expand Up @@ -123,9 +123,12 @@ try
Test-TargetResource @testParameters | Should -BeFalse
}

It 'Should create the scheduled task in the set method' {
It 'Should create the scheduled task in the set method and return the correct values from Get-TargetResource' {
Set-TargetResource @testParameters
$result = Get-TargetResource @getTargetResourceParameters
$result.Ensure | Should -Be 'Present'
}

}

Context 'No scheduled task exists, but it should, with MultipleInstances = StopExisting' {
Expand All @@ -149,12 +152,10 @@ try
Test-TargetResource @testParameters | Should -BeFalse
}

It 'Should create the scheduled task in the set method' {
It 'Should create the scheduled task in the set method and return the correct values from Get-TargetResource' {
Set-TargetResource @testParameters
}

It 'Should return the correct values from Get-TargetResource for updated state' {
$result = Get-TargetResource @getTargetResourceParameters
$result.Ensure | Should -Be 'Present'
$result.MultipleInstances | Should -Be $testParameters.MultipleInstances
}

Expand Down

0 comments on commit 995b3f4

Please sign in to comment.