initial
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# 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}}"
|
||||
@@ -0,0 +1,47 @@
|
||||
# Tests if reservation can be created
|
||||
|
||||
# Create reservation type
|
||||
POST http://localhost/wordpress/wp-json/reservations/v1/type
|
||||
{
|
||||
"name": "test",
|
||||
"description": "testik",
|
||||
"configuration": {
|
||||
"steps": [
|
||||
{
|
||||
"index": 0,
|
||||
"type": "timetable",
|
||||
"configuration": {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
HTTP 200
|
||||
[Captures]
|
||||
reservation_type_id: jsonpath "$"
|
||||
|
||||
# Get timetable
|
||||
GET http://localhost/wordpress/wp-json/reservations/v1/type/{{reservation_type_id}}
|
||||
HTTP 200
|
||||
|
||||
# Create reservation
|
||||
POST http://localhost/wordpress/wp-json/reservations/v1/reservation
|
||||
{
|
||||
"metadata": {
|
||||
"email": "test@test.cz",
|
||||
"phone": "+420 608 349 219"
|
||||
},
|
||||
"is_confirmed": null,
|
||||
"reservation_type_id": {{reservation_type_id}},
|
||||
"steps": {
|
||||
"0": {
|
||||
"timetable_id": 1,
|
||||
"date": "2025-1-1",
|
||||
"start_time": "8:00",
|
||||
"end_time": "9:00"
|
||||
}
|
||||
}
|
||||
}
|
||||
HTTP 200
|
||||
[Captures]
|
||||
Reference in New Issue
Block a user