diff --git a/src/Modules/PSGalleryModules.csproj b/src/Modules/PSGalleryModules.csproj index 80a1b7e20224c..0dd1a39c68f23 100644 --- a/src/Modules/PSGalleryModules.csproj +++ b/src/Modules/PSGalleryModules.csproj @@ -13,7 +13,7 @@ - + diff --git a/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 b/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 index fb5d632765c46..1fd935b22dd1d 100644 --- a/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 +++ b/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1 @@ -145,15 +145,10 @@ Describe "PowerShellGet - Module tests" -tags "Feature" { It "Should install a module correctly to the required location with default CurrentUser scope" { Install-Module -Name $TestModule -Repository $RepositoryName - $installedModuleInfo = Get-InstalledModule -Name $TestModule - - $installedModuleInfo | Should -Not -BeNullOrEmpty - $installedModuleInfo.Name | Should -Be $TestModule - $installedModuleInfo.InstalledLocation.StartsWith($script:MyDocumentsModulesPath, [System.StringComparison]::OrdinalIgnoreCase) | Should -BeTrue - - $module = Get-Module $TestModule -ListAvailable + $module = Get-Module -Name $TestModule -ListAvailable + $module | Should -Not -BeNullOrEmpty $module.Name | Should -Be $TestModule - $module.ModuleBase | Should -Be $installedModuleInfo.InstalledLocation + $module.ModuleBase.StartsWith($script:MyDocumentsModulesPath, [System.StringComparison]::OrdinalIgnoreCase) | Should -BeTrue } AfterAll {