21 lines
479 B
Plaintext
21 lines
479 B
Plaintext
# Tests if reservation can be created
|
|
|
|
# Create reservation
|
|
POST http://localhost/wordpress/wp-json/reservations/v1/reservation
|
|
{
|
|
"metadata": {
|
|
"email": "test@test.cz",
|
|
"phone": "608 349 219"
|
|
},
|
|
"is_confirmed": null
|
|
}
|
|
HTTP 200
|
|
[Captures]
|
|
object_id: jsonpath "$"
|
|
|
|
# Get timetable
|
|
GET http://localhost/wordpress/wp-json/reservations/v1/reservation/{{object_id}}
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.name" == "Test Timetable"
|
|
jsonpath "$.id" == "{{object_id}}" |