-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User story9 #101
User story9 #101
Conversation
User Story 9, Registration Email must be unique #74 |
@@ -31,6 +34,12 @@ def edit | |||
|
|||
private | |||
|
|||
def email_confirmation | |||
User.email_string.all? do |email| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just use an .include?
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it is meeting the US. Nice work.
user_2 = User.create!(name: "default_user1", role: 0, active: true, password_digest: "8320280282", address: "333", city: "Denver", state: "CO", zip: "80000", email: "[email protected]" ) | ||
user_3 = User.create!(name: "default_user2", role: 0, active: true, password_digest: "8320280282", address: "333", city: "Denver", state: "CO", zip: "80000", email: "[email protected]" ) | ||
|
||
expect(User.email_string).not_to eq(["[email protected]", "[email protected]", "[email protected]"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a positive expectation as well?
Added email confirmation method and verified the test was passing.
Added tests in models and new user spec.
Added test for password confirmation.