Sprint 2 | Admin | Book C.R.U.D | GIF Validations
-
Check if the book related to the GIFs already exists in the database
-
Handle invalid or corrupted GIFs
-
Return appropriate error messages for invalid uploads or books not found
Scenario: Upload GIFs for an existing book
Given a valid GIFs containing GIFs for an existing book is sent to the upload endpoint
When the GIFs is uploaded to the service
Then the service should extract the metadata to identify the book
And check if the book exists in the database
And if the book exists, the service should send to the repository a command to update all gifs related to the book
Scenario: Upload GIFs for a non-existent book
Given a GIFs for a non-existent or invalid book is sent to the upload endpoint
When the GIFs is uploaded to the service
Then the service should return an error response indicating the book was not found in the system
Scenario: Upload invalid or corrupted GIFs
Given an invalid or corrupted GIFs is sent to the upload endpoint
When the file is uploaded to the service
Then the service should return an error response indicating the GIFs could not be processed