Skip to content

Commit

Permalink
add test to reuse object from the server (#5976)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Apr 19, 2020
1 parent a8620b8 commit 171f718
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: OpenAPI Generator Team
#
# Generated on: 4/10/20
# Generated on: 4/19/20
#

@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,21 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' {
$file = Get-Item "./plus.gif"
#$Result = Invoke-PSUploadFile -petId $Id -additionalMetadata "Additional data" -File $file

# modify and update
#
$NewPet = $Result["response"]

$NewPet."id" = $NewPet."id" + 1
$NewPet."name" = $NewPet."name" + "PowerShell Modify"

$Result = Update-PSPet -Pet $NewPet
$Result = Get-PSPetById -petId $NewPet."id" -WithHttpInfo
$Result["Response"]."id" | Should Be $NewPet."id"
$Result["Response"]."name" | Should Be $NewPet."name"

# Delete
$Result = Remove-Pet -petId $Id
$Result = Remove-Pet -petId $NewPet."id"

}

Expand Down

0 comments on commit 171f718

Please sign in to comment.