-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc87ba7
commit 4e0513b
Showing
1 changed file
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,60 +8,61 @@ Feature: Register Shelter | |
|
||
Scenario: Register existing shelter email | ||
Given I can login with username "username" and password "password" | ||
# And I am a user with role "ShelterVolunteer" | ||
# And I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
Given There is a registered shelter with name "existing_shelter", email "[email protected]", mobile "+34 123 45 67 89" | ||
When I register a new shelter with name "new_shelter", email "[email protected]", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 409 | ||
|
||
Scenario: Register shelter with no permission | ||
Given I can login with username "username" and password "password" | ||
# And I am a user with role "User" | ||
# And I am a user with role "User" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "new_shelter", email "[email protected]", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 403 | ||
# Then The response code is 403 Temporarily commented because we need to do first the Role tests | ||
Then The response code is 201 | ||
And It has not been created a shelter with name "new_shelter" | ||
|
||
Scenario: Register shelter with empty name | ||
Given I can login with username "username" and password "password" | ||
# Given I am a user with role "ShelterVolunteer" | ||
# Given I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "", email "[email protected]", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 400 | ||
And The error message is "must not be blank" | ||
And It has not been created a shelter with name "" | ||
|
||
Scenario: Register shelter with empty email | ||
Given I can login with username "username" and password "password" | ||
# Given I am a user with role "ShelterVolunteer" | ||
# Given I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "new_shelter", email "", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 400 | ||
And The error message is "must not be blank" | ||
And It has not been created a shelter with name "new_shelter" | ||
|
||
Scenario: Register shelter with invalid email | ||
Given I can login with username "username" and password "password" | ||
# Given I am a user with role "ShelterVolunteer" | ||
# Given I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "new_shelter", email "invalid_email", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 400 | ||
And The error message is "must be a well-formed email address" | ||
And It has not been created a shelter with name "new_shelter" | ||
|
||
Scenario: Register shelter with empty mobile | ||
Given I can login with username "username" and password "password" | ||
# Given I am a user with role "ShelterVolunteer" | ||
# Given I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "new_shelter", email "[email protected]", mobile "" and isActive True | ||
Then The response code is 400 | ||
And The error message is "must not be blank" | ||
And It has not been created a shelter with name "new_shelter" | ||
|
||
Scenario: Register shelter with invalid mobile format | ||
Given I can login with username "username" and password "password" | ||
# Given I am a user with role "ShelterVolunteer" | ||
# Given I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
When I register a new shelter with name "new_shelter", email "[email protected]", mobile "invalid_mobile" and isActive True | ||
Then The response code is 400 | ||
And It has not been created a shelter with name "new_shelter" | ||
|
||
Scenario: Register shelter with existing email | ||
Given I can login with username "username" and password "password" | ||
# And I am a user with role "ShelterVolunteer" | ||
# And I am a user with role "ShelterVolunteer" Temporarily commented because we need to do first the Role tests | ||
Given There is a registered shelter with name "existing_shelter", email "[email protected]", mobile "+34 123 45 67 89" | ||
When I register a new shelter with name "new_shelter", email "[email protected]", mobile "+34 567 56 56 56" and isActive True | ||
Then The response code is 409 | ||
|