Validate uniqueness of user email address

* Make user.email attribute unique
* Render validations error messages in users/new view
This commit is contained in:
Thibault Jouan
2011-09-08 15:40:30 +00:00
parent 35b081ed68
commit 688a178376
6 changed files with 44 additions and 1 deletions

View File

@@ -9,3 +9,8 @@ Feature: User
When I follow the sign up link
And I fill in the sign up form
Then I should be redirected to the home page
Scenario: User can't register twice with the same email address
Given a user with "unique@example.net" email address exists
When I register with "unique@example.net" email address
Then I should see "Email has already been taken"