Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Describe "PSResourceGet - Module tests (Admin)" -Tags @('Feature', 'RequireAdmin
}

It "Should install a module correctly to the required location with AllUsers scope" {
Install-PSResource -Name $TestModule -Repository $RepositoryName -Scope AllUsers
Install-PSResource -Name $TestModule -Repository $RepositoryName -Scope AllUsers -ErrorAction Stop

$module = Get-Module $TestModule -ListAvailable
$module.Name | Should -Be $TestModule
Expand Down Expand Up @@ -323,7 +323,7 @@ Describe "PSResourceGet - Script tests (Admin)" -Tags @('Feature', 'RequireAdmin
}

It "Should install a script correctly to the required location with AllUsers scope" {
Install-PSResource -Name $TestScript -Repository $RepositoryName -Scope AllUsers
Install-PSResource -Name $TestScript -Repository $RepositoryName -Scope AllUsers -ErrorAction Stop
}

AfterAll {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Describe "PowerShellGet - Module tests (Admin)" -Tags @('Feature', 'RequireAdmin
}

It "Should install a module correctly to the required location with AllUsers scope" {
Install-Module -Name $TestModule -Repository $RepositoryName -Scope AllUsers
Install-Module -Name $TestModule -Repository $RepositoryName -Scope AllUsers -ErrorAction Stop

$module = Get-Module $TestModule -ListAvailable
$module.Name | Should -Be $TestModule
Expand Down Expand Up @@ -247,7 +247,7 @@ Describe "PowerShellGet - Script tests (Admin)" -Tags @('Feature', 'RequireAdmin
}

It "Should install a script correctly to the required location with AllUsers scope" {
Install-Script -Name $TestScript -Repository $RepositoryName -NoPathUpdate -Scope AllUsers
Install-Script -Name $TestScript -Repository $RepositoryName -NoPathUpdate -Scope AllUsers -ErrorAction Stop
$installedScriptInfo = Get-InstalledScript -Name $TestScript

$installedScriptInfo | Should -Not -BeNullOrEmpty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function RunUpdateHelpTests

[hashtable] $UICultureParam = $(if ((Get-UICulture).Name -ne $myUICulture) { @{ UICulture = $myUICulture } } else { @{} })
[hashtable] $sourcePathParam = $(if ($useSourcePath) { @{ SourcePath = Join-Path $PSScriptRoot assets } } else { @{} })
Update-Help -Module:$moduleName -Force @UICultureParam @sourcePathParam -Scope:$updateScope
Update-Help -Module:$moduleName -Force @UICultureParam @sourcePathParam -Scope:$updateScope -ErrorAction Stop

[hashtable] $userScopeParam = $(if ($userscope) { @{ UserScope = $true } } else { @{} })
ValidateInstalledHelpContent -moduleName:$moduleName @userScopeParam
Expand Down
Loading