Files
Reservair/tests/hurl/objects.hurl
T

30 lines
702 B
Plaintext
Raw Normal View History

2026-06-11 19:03:29 +02:00
# test objects
GET http://localhost/wordpress/wp-json/reservations/v1/object
HTTP 200
[Asserts]
jsonpath "$" isEmpty
POST http://localhost/wordpress/wp-json/reservations/v1/object
{
"name": "TestObject1"
}
HTTP 200
GET http://localhost/wordpress/wp-json/reservations/v1/object
HTTP 200
[Captures]
object_id: jsonpath "$[0].reservation_object_id"
[Asserts]
jsonpath "$" count == 1
jsonpath "$[0].name" == "TestObject1"
jsonpath "$[0].is_readonly" == "0"
DELETE http://localhost/wordpress/wp-json/reservations/v1/object/a
HTTP 404
DELETE http://localhost/wordpress/wp-json/reservations/v1/object/1
HTTP 404
DELETE http://localhost/wordpress/wp-json/reservations/v1/object/{{object_id}}
HTTP 200