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

test: add otp tests #402

Merged
merged 1 commit into from
Jul 10, 2020
Merged

test: add otp tests #402

merged 1 commit into from
Jul 10, 2020

Conversation

shadowgate15
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #402 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #402   +/-   ##
=======================================
  Coverage   75.00%   75.00%           
=======================================
  Files           1        1           
  Lines          24       24           
=======================================
  Hits           18       18           
  Misses          6        6           

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 7b339ce...b9ee54e. Read the comment docs.

@shaunwarman
Copy link
Member

Can we safely remove:

if (ctx.method === 'DELETE') {
ctx.state.user[config.passport.fields.otpEnabled] = false;
await ctx.state.user.save();
ctx.flash('custom', {
title: ctx.request.t('Success'),
text: ctx.translate('REQUEST_OK'),
type: 'success',
toast: true,
showConfirmButton: false,
timer: 3000,
position: 'top'
});
ctx.redirect(ctx.state.l('/my-account/security'));
return;
}


const mongod = new MongodbMemoryServer();
const adapter = new MongooseAdapter();
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a comment here on the adapter usage

@shaunwarman shaunwarman merged commit f559bd6 into ladjs:master Jul 10, 2020
@shadowgate15 shadowgate15 deleted the otp_tests branch August 2, 2020 15:50
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