-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12822b4
commit c9dd262
Showing
1 changed file
with
50 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 |
---|---|---|
|
@@ -19,3 +19,53 @@ testcases: | |
- result.bodyjson.users[0] ShouldContainKey Firstname | ||
- result.bodyjson.users[0].ID ShouldBeNumber | ||
- result.bodyjson.users[0].Firstname ShouldBeString | ||
- name: CreateUser | ||
steps: | ||
- type: http | ||
method: POST | ||
url: "{{.url}}/user" | ||
body: | | ||
{ | ||
"Firstname": "Anne", | ||
"Lastname": "Ungurean", | ||
"Email": "[email protected]" | ||
} | ||
headers: | ||
Accept: application/json | ||
Content-Type: application/json | ||
assertions: | ||
- result.statuscode ShouldEqual 201 | ||
- result.bodyjson ShouldContainKey ID | ||
- result.bodyjson.ID ShouldBeNumber | ||
- result.bodyjson.Firstname ShouldEqual Anne | ||
- result.bodyjson.Email ShouldEqual "[email protected]" | ||
- name: UpdateUser | ||
steps: | ||
- type: http | ||
method: PUT | ||
url: "{{.url}}/user/1" | ||
body: | | ||
{ | ||
"Firstname": "Anne", | ||
"Lastname": "Ungurean", | ||
"Email": "[email protected]" | ||
} | ||
headers: | ||
Accept: application/json | ||
Content-Type: application/json | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
- result.bodyjson ShouldContainKey Firstname | ||
- result.bodyjson.Firstname ShouldEqual Anne | ||
- result.bodyjson.Lastname ShouldEqual Ungurean | ||
- result.bodyjson.Email ShouldEqual "[email protected]" | ||
- name: DeleteUser | ||
steps: | ||
- type: http | ||
method: DELETE | ||
url: "{{.url}}/user/1" | ||
headers: | ||
Accept: application/json | ||
Content-Type: application/json | ||
assertions: | ||
- result.statuscode ShouldEqual 204 |