-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
* feat(users): change username to usernameOrEmail in signin * fix(users): toLowerCase at email in local strategy
- Loading branch information
There are no files selected for viewing
7 comments
on commit 6a6b630
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.
@lirantal Hello, in modules/users/tests/server/user.server.routes.tests.js
should be able to login with username and email successfully and logout successfully
you make two agent.post('/api/auth/signin') with credentials, credentialsEmail is not used
a oversights if I'm not mistaken? :)
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.
@PierreBrisorgueil I took a look at this, and you're correct. The second login should be using credentialsEmail.
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.
@mleanos that's not more clear to make two tests in this case ?
it('should be able to login with username successfully and logout successfully', function (done)
it('should be able to login with email successfully and logout successfully', function (done)
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.
@PierreBrisorgueil I agree with you, make two test is more clear
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.
Yes. We should have two separate tests.
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.
@itelo @PierreBrisorgueil could you please submit a PR with enhancements on this?
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.
Hello @itelo , it's signup, so we have two inputs for me, email, and username,
it('Should report missing username or email', function () {
should be
it('Should report missing username', function () {