-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update post-fragments to perform a get request after posting a fragment
- Loading branch information
1 parent
01b7fdf
commit 33728e6
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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!" |