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

Sommy #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Sommy #22

wants to merge 2 commits into from

Conversation

amaugosomto
Copy link
Collaborator

Added test files for loanRequest and loanRepaid....
Edited function requestLoan to send specific status codes.. And also edited function repaidLoan, added checks for double entry and also added appropriate response status codes.

@amaugosomto amaugosomto requested a review from wilforlan July 4, 2018 08:11
@@ -13,12 +13,12 @@ function RequestLoan (req, res){
// check if guarantor id and user id is the same
// both cant be the same, because a user cannot be his own guarantor

if (loanObject.userId === loanObject.guarantorId) return res.json({'status': false,
if (loanObject.userId === loanObject.guarantorId) return res.status(403).json({'status': false,
Copy link
Owner

Choose a reason for hiding this comment

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

Looks good

Copy link
Owner

@wilforlan wilforlan left a comment

Choose a reason for hiding this comment

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

The request headers should be settable

@amaugosomto
Copy link
Collaborator Author

Okay.. This is what i understand from your review.

You don't want me to set request headers by myself, it should be set by the login test suite and then my test uses it to pass or fail..

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