File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -347,6 +347,24 @@ Describe 'Test CompatPowerShellGet: Update-PSResource' -tags 'CI' {
347
347
$res.Name | Should - Contain $testModuleName
348
348
$res.Version | Should - Contain " 3.0.0.0"
349
349
}
350
+
351
+ It " Update resource installed given -Name and -Force parameters" {
352
+ Install-PSResource - Name $testModuleName - Version " 1.0.0.0" - Repository $PSGalleryName - TrustRepository
353
+
354
+ Update-Module - Name $testModuleName - RequiredVersion " 3.0.0.0" - Foce
355
+ $res = Get-InstalledPSResource - Name $testModuleName
356
+
357
+ $isPkgUpdated = $false
358
+ foreach ($pkg in $res )
359
+ {
360
+ if ([System.Version ]$pkg.Version -gt [System.Version ]" 1.0.0.0" )
361
+ {
362
+ $isPkgUpdated = $true
363
+ }
364
+ }
365
+
366
+ $isPkgUpdated | Should - Be $true
367
+ }
350
368
}
351
369
352
370
# Ensure that PSGet v2 was not loaded during the test via command discovery
You can’t perform that action at this time.
0 commit comments