Skip to content

Adds ability to login with email when specifying it #4276

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

Merged
merged 3 commits into from
Oct 24, 2017
Merged

Conversation

flovilmart
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 21, 2017

Codecov Report

Merging #4276 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #4276     +/-   ##
=========================================
+ Coverage   92.23%   92.43%   +0.2%     
=========================================
  Files         116      118      +2     
  Lines        8124     8155     +31     
=========================================
+ Hits         7493     7538     +45     
+ Misses        631      617     -14
Impacted Files Coverage Δ
src/Routers/UsersRouter.js 92.96% <100%> (+1.91%) ⬆️
src/Config.js 93.96% <0%> (-1.34%) ⬇️
src/RestWrite.js 93.16% <0%> (-0.19%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 96.5% <0%> (-0.12%) ⬇️
src/index.js 100% <0%> (ø) ⬆️
src/cli/utils/commander.js 100% <0%> (ø) ⬆️
src/cli/definitions/parse-server.js 100% <0%> (ø) ⬆️
src/cli/utils/parsers.js
src/Options/Definitions.js 100% <0%> (ø)
src/Controllers/index.js 96.66% <0%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31bd02c...eb1f286. Read the comment docs.

@flovilmart flovilmart requested a review from montymxb October 24, 2017 19:48
}).then(done).catch(done.fail);
});

it('can to login when both email and username are passed', (done) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can to, probably should just can

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

}).then(done).catch(done.fail);
});

it('fails to login when username dont match email', (done) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not critical but dont is bugging me

return rp.get(options);
}).then(done).catch(done.fail);
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have an additional test here for trying cannot login with email and bad password, just to cover if a possible bug were introduced regarding password validation with an email at any point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the test on the next line.

Copy link
Contributor

@montymxb montymxb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good! Just some typos and an additional test and this should be ready to go.

Copy link
Contributor

@montymxb montymxb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, let's see what the CI says and we can move this along.

@flovilmart
Copy link
Contributor Author

Thanks man!

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.

2 participants