From da290893ac9328e56103c46871c11d1a7a996080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Gonz=C3=A1lez=20Liarte?= Date: Fri, 5 Apr 2024 23:38:52 +0200 Subject: [PATCH] [TEST] Add UpdateShelterCertificateFeature test --- .../features/UpdateShelterCertificate.feature | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/test/resources/features/UpdateShelterCertificate.feature diff --git a/src/test/resources/features/UpdateShelterCertificate.feature b/src/test/resources/features/UpdateShelterCertificate.feature new file mode 100644 index 0000000..271ab79 --- /dev/null +++ b/src/test/resources/features/UpdateShelterCertificate.feature @@ -0,0 +1,30 @@ +Feature: Update Shelter Certificate + In order to maintain shelter certificate information + As a user with appropriate permissions + I want to be able to update a shelter certificate + + Background: + Given There is a registered user with username "username" and password "password" and email "user@email.com" + + Scenario: Update existing shelter certificate + Given I can login with username "username" and password "password" + And There is a registered shelter certificate with id "1" for shelter with name "existing_shelter" + When I update the shelter certificate with id "1" and new attributes: + | expirationDate | + | 2023-12-31T00:00:00 | + Then The response code is 200 + + Scenario: Update non-existent shelter certificate + Given I can login with username "username" and password "password" + When I update the shelter certificate with id "999" and new attributes: + | expirationDate | + | 2023-12-31T00:00:00 | + Then The response code is 404 + + Scenario: Update shelter certificate when I am not logged in + Given I'm not logged in + And There is a registered shelter certificate with id "1" for shelter with name "existing_shelter" + When I update the shelter certificate with id "1" and new attributes: + | expirationDate | + | 2023-12-31T00:00:00 | + Then The response code is 401 \ No newline at end of file