Skip to content

Commit

Permalink
Provide feature tests for empty booking info put
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Eelen committed Aug 8, 2023
1 parent 2a1d4c1 commit dd33983
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
28 changes: 28 additions & 0 deletions features/data/events/event-with-bookinginfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"mainLanguage": "nl",
"name": {
"nl": "Permanent event with bookinginfo"
},
"terms": [
{
"id": "0.50.4.0.0",
"label": "Concert",
"domain": "eventtype"
}
],
"location": {
"@id": "%{placeUrl}"
},
"calendarType": "permanent",
"bookingInfo": {
"phone": "string",
"email": "[email protected]",
"url": "https://www.example.com",
"urlLabel": {
"nl": "Nederlandse beschrijving",
"en": "English description"
},
"availabilityStarts": "2021-05-17T22:00:00+00:00",
"availabilityEnds": "2021-05-17T22:00:00+00:00"
}
}
15 changes: 14 additions & 1 deletion features/event/booking-info.feature
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,17 @@ Feature: Test the UDB3 events API
}
]
}
"""
"""

Scenario: Delete event booking info (with put)
Given I create an event from "events/event-with-bookinginfo.json" and save the "url" as "eventUrl"
When I set the JSON request payload to:
"""
{
"bookingInfo": {}
}
"""
And I send a PUT request to "%{eventUrl}/booking-info"
Then the response status should be "204"
When I get the event at "%{eventUrl}"
And the JSON response should not have "bookingInfo"
13 changes: 13 additions & 0 deletions features/place/booking-info.feature
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@ Feature: Test place bookingInfo property
"""
"The place with id \"0680f399-7768-4ba0-b33a-d4d15c21282e\" was not found."
"""

Scenario: Delete place booking info (with put)
Given I create a place from "places/place-with-all-fields.json" and save the "url" as "placeUrl"
When I set the JSON request payload to:
"""
{
"bookingInfo": {}
}
"""
And I send a PUT request to "%{placeUrl}/booking-info"
Then the response status should be "204"
When I get the place at "%{placeUrl}"
And the JSON response should not have "bookingInfo"

0 comments on commit dd33983

Please sign in to comment.