generated from nvimdev/nvim-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(examples): add todo API tests and enhance existing examples
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Get all todos | ||
GET https://wattpm-demo.fly.dev/express/api/todo | ||
|
||
HTTP 200 | ||
[Asserts] | ||
jsonpath "$.status" == "success" | ||
header "server" contains "Fly" | ||
|
||
|
||
# Throw error if text is not provided | ||
POST https://wattpm-demo.fly.dev/express/api/todo | ||
Content-Type: application/json | ||
{} | ||
HTTP 400 | ||
[Asserts] | ||
jsonpath "$.status" == "error" | ||
jsonpath "$.message" == "Text is required" | ||
|
||
# Create a new todo | ||
POST https://wattpm-demo.fly.dev/express/api/todo | ||
Content-Type: application/json | ||
{ | ||
"text": "Call Express API from hurl.nvim at {{now}}" | ||
} | ||
HTTP 201 |