mirror of
https://git.dirksys.ovh/dirk/bankserver.git
synced 2025-12-20 02:59:20 +01:00
24 lines
552 B
Plaintext
24 lines
552 B
Plaintext
POST {{host}}/api/login
|
|
{
|
|
"name": "user1",
|
|
"password": "this-is-a-password"
|
|
}
|
|
HTTP 200
|
|
|
|
[Captures]
|
|
token: jsonpath "$.token"
|
|
|
|
GET {{host}}/api/users?limit=50
|
|
Authorization: Bearer {{token}}
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.pagination.limit" == 50
|
|
jsonpath "$.pagination.offset" == 0
|
|
jsonpath "$.result" isCollection
|
|
jsonpath "$.result[0].name" == "user1"
|
|
jsonpath "$.result[1].name" == "user2"
|
|
jsonpath "$.result[2].name" == "user3"
|
|
jsonpath "$.result[3].name" == "user4"
|
|
jsonpath "$.result[4].name" == "user5"
|
|
jsonpath "$.result[5].name" == "user6"
|