Skip to content

Commit 688b41f

Browse files
Fix tests
1 parent fbed494 commit 688b41f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

test/SavePSResourceTests/SavePSResourceV2.Tests.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ Describe 'Test HTTP Save-PSResource for V2 Server Protocol' -tags 'CI' {
203203

204204
# Save resource that requires license
205205
It "Save resource that requires accept license with -AcceptLicense flag" {
206-
Save-PSResource -Repository $PSGalleryName -TrustRepository -Path $SaveDir `
207-
-Name $testModuleName2 -AcceptLicense
206+
$pkg = Save-PSResource -Repository $PSGalleryName -TrustRepository -Path $SaveDir -Name $testModuleName2 -AcceptLicense -PassThru
208207
$pkg = Get-InstalledPSResource -Path $SaveDir -Name $testModuleName2
209208
$pkg.Name | Should -Be $testModuleName2
210209
$pkg.Version | Should -Be "0.0.1.0"

test/SavePSResourceTests/SavePSResourceV3.Tests.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,8 @@ Describe 'Test HTTP Save-PSResource for V3 Server Protocol' -tags 'CI' {
149149
}
150150

151151
# Save resource that requires license
152-
It 'Install resource that requires accept license with -AcceptLicense flag' {
153-
Save-PSResource -Repository $NuGetGalleryName -TrustRepository -Path $SaveDir `
154-
-Name 'test_module_withlicense' -AcceptLicense
155-
$pkg = Get-InstalledPSResource -Path $SaveDir 'test_module_withlicense'
152+
It 'Save resource that requires accept license with -AcceptLicense flag' {
153+
$pkg = Save-PSResource -Repository $NuGetGalleryName -TrustRepository -Path $SaveDir -Name 'test_module_withlicense' -AcceptLicense -PassThru
156154
$pkg.Name | Should -Be 'test_module_withlicense'
157155
$pkg.Version | Should -Be '1.0.0'
158156
}

0 commit comments

Comments
 (0)