FEATURE: don't allow username and password to be the same

This commit is contained in:
Neil Lalonde
2015-02-25 11:59:57 -05:00
parent bcb0346595
commit cf81b3f86d
6 changed files with 42 additions and 0 deletions

View File

@ -72,6 +72,13 @@ describe PasswordValidator do
expect(record.errors[:password]).not_to be_present
end
end
it "adds an error when password is the same as the username" do
@password = "porkchops1"
record.username = @password
validate
expect(record.errors[:password]).to be_present
end
end
context "password not required" do