CSCI-GA-2820-FA24-001 / wishlists

NYU DevOps Wishlists Service Fall 2024
Apache License 2.0
0 stars 0 forks source link

Update an Item in a Wishlist #6

Open Wstz0231 opened 2 weeks ago

Wstz0231 commented 2 weeks ago

As a customer I need to update the details of an item in my wishlist So that I can ensure the product information is accurate

Details and Assumptions

Scenario: Update an item in a non-existent wishlist Given a customer wants to update an item in a wishlist When they send a PUT request to "/wishlists/999/items/1" with valid updated item data Then the system should return a 404 Not Found error with an appropriate error message

Scenario: Update a non-existent item in a wishlist Given a customer wants to update a non-existent item in their wishlist When they send a PUT request to "/wishlists/1/items/999" with valid updated item data Then the system should return a 404 Not Found error with an appropriate error message

Scenario: Update an item with a name that already exists in the wishlist Given a customer has an item named "Laptop" in their wishlist And another item named "Headphones" in the same wishlist When they send a PUT request to "/wishlists/1/items/2" with the name "Laptop" Then the system should return a 409 Conflict error with an appropriate error message

Scenario: Update an item with invalid or incomplete data Given a customer wants to update an item in their wishlist When they send a PUT request to "/wishlists/1/items/1" with invalid or incomplete item data Then the system should return a 400 Bad Request error with details about the validation errors