Skip to content
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

Closed
wants to merge 5 commits into from
Closed

User story9 #101

wants to merge 5 commits into from

Conversation

zachlp2016
Copy link

Added email confirmation method and verified the test was passing.
Added tests in models and new user spec.
Added test for password confirmation.

@WHomer
Copy link

WHomer commented May 22, 2019

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|
Copy link
Owner

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?

Copy link

@WHomer WHomer left a 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]"])
Copy link
Owner

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?

@WHomer WHomer closed this May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants