Skip to content
Snippets Groups Projects
Commit d25847a6 authored by Sarah Mei's avatar Sarah Mei
Browse files

Error message for duplicate email; add email validation spec.

parent 6869afc6
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,8 @@ en:
attributes:
username:
taken: "is already taken."
email:
taken: "is already taken."
hello: "Hello world"
application:
helper:
......
......@@ -47,6 +47,18 @@ describe User do
user.username.should == "someuppercase"
end
end
describe "of email" do
it "requires email address" do
user = Factory.build(:user, :email => nil)
user.should_not be_valid
end
it "requires a unique email address" do
duplicate_user = Factory.build(:user, :email => user.email)
duplicate_user.should_not be_valid
end
end
end
describe '#diaspora_handle' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment