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

#159403248 Increase coverage by 75% #14

Merged
merged 1 commit into from
Aug 2, 2018

Conversation

veeqtor
Copy link
Contributor

@veeqtor veeqtor commented Aug 1, 2018

What does this PR do?

Increase coverage by 75%

Description of Task to be completed?

  • add tests for user profile modifications
  • modify a utility function
  • modify validate.js

How should this be manually tested?

  • After cloning the repo, cd into the directory
  • Run cp .env.sample .env
  • Fill in the required database fields
  • Run npm install
  • Run npm run migrate
  • Run npm test

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#159403248

Screenshots (if appropriate)

N/A

- add tests for user profile modifications
- modify a utility function
- modify validate.js

[Delivers #159403248]
@coveralls
Copy link

Pull Request Test Coverage Report for Build 212

  • 9 of 9 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+17.2%) to 86.585%

Totals Coverage Status
Change from base Build 209: 17.2%
Covered Lines: 159
Relevant Lines: 173

💛 - Coveralls

@veeqtor veeqtor requested a review from OKiMaureen August 1, 2018 14:03
@@ -45,7 +45,7 @@ export default class ValidateUser {
static validatePassword(str) {
const passwordFormat = /((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+[0-9a-z]+$/i;
if (!str || str.trim().length < 1) {
return { error: 'Password cannnot be empty' };
return { error: 'Password cannot be empty' };
Copy link
Contributor

@klevamane klevamane Aug 1, 2018

Choose a reason for hiding this comment

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

Implement returning 'error' as stated in the readme.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is a function I wrote. This return is from a helper method in this class and not from the json response. The Json response using this method returns errors in the right format.

Copy link
Contributor

@klevamane klevamane left a comment

Choose a reason for hiding this comment

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

Follow the method on the Readme when returning a response error.

Copy link
Contributor

@klevamane klevamane left a comment

Choose a reason for hiding this comment

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

I understand that the return format is from a helper method in this class and not from the json response.

Copy link
Contributor

@anuonifade anuonifade left a comment

Choose a reason for hiding this comment

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

LGTM

@anuonifade anuonifade merged commit a42b857 into develop Aug 2, 2018
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.

None yet

6 participants