OllieWebb / Hotel

Group Sparta Global Proejct
0 stars 0 forks source link

CRUD Operations for Hotel and Landmarks #1

Open MarkoKovac153 opened 3 months ago

MarkoKovac153 commented 3 months ago

As an admin, when I open the API in swagger, I want to be able to perform CRUD operations on Hotel and Landmark data, so that I can change the Hotel and Landmark data

Eve-Burton commented 3 months ago

Gherkin

Feature: CRUD Operations on Hotel and Landmark Data

Scenario: Create a new Hotel Given I am an admin When I open the API in Swagger And I send a POST request to create a new hotel with the following details: name address rating
Then the response status should be 201
And the response body should contain the new hotel's details
And the hotel should be present in the list of hotels

Scenario: Read Hotel data Given I am an admin When I open the API in Swagger And I send a GET request to retrieve the hotel data for hotel ID 1 Then the response status should be 200 And the response body should contain the hotel's details

Scenario: Update Hotel data Given I am an admin When I open the API in Swagger And I send a PUT request to update the hotel data for hotel ID 1 with the following details: name address rating
Then the response status should be 200
And the response body should contain the updated hotel's details
And the updated hotel details should be present in the list of hotels

Scenario: Delete Hotel data Given I am an admin When I open the API in Swagger And I send a DELETE request to delete the hotel data for hotel ID 1 Then the response status should be 204 And the hotel should no longer be present in the list of hotels