22 lines
506 B
Plaintext
22 lines
506 B
Plaintext
# Create timetable
|
|
POST http://localhost/wordpress/wp-json/reservations/v1/timetable
|
|
{
|
|
"name": "Test Timetable"
|
|
}
|
|
HTTP 200
|
|
[Captures]
|
|
object_id: jsonpath "$"
|
|
|
|
# Update timetable
|
|
PUT http://localhost/wordpress/wp-json/reservations/v1/timetable/{{object_id}}
|
|
{
|
|
"name": "Test Timetable Updated"
|
|
}
|
|
HTTP 200
|
|
|
|
# Check timetable
|
|
GET http://localhost/wordpress/wp-json/reservations/v1/timetable/{{object_id}}
|
|
HTTP 200
|
|
[Asserts]
|
|
jsonpath "$.name" == "Test Timetable Updated"
|
|
jsonpath "$.id" == {{object_id}} |