Skip to content

Commit

Permalink
update post-fragments to perform a get request after posting a fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
hpatel292-seneca committed Jul 22, 2024
1 parent 01b7fdf commit 33728e6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/integration/post-fragments.hurl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# tests/integration/post-fragments.hurl
POST http://localhost:8080/v1/fragments
Content-Type: text/plain
[BasicAuth]
Expand All @@ -16,3 +17,17 @@ jsonpath "$.fragment.updated" isString
jsonpath "$.fragment.type" == "text/plain"
# 19 is the length of our fragment data: 'This is a fragment!'
jsonpath "$.fragment.size" == 19
# Capture the location header
[Captures]
uri: header "Location"

# 2. Try to the get the above posted fragment by using uri.
GET {{uri}}
[BasicAuth]
[email protected]:password1

HTTP/1.1 200
Content-Type: text/plain; charset=utf-8
Content-Length: 19
[Asserts]
body == "This is a fragment!"

0 comments on commit 33728e6

Please sign in to comment.