Skip to content

Update disburse loan test#21

Open
adydams wants to merge 4 commits into
wilforlan:masterfrom
adydams:disburse_loan_test
Open

Update disburse loan test#21
adydams wants to merge 4 commits into
wilforlan:masterfrom
adydams:disburse_loan_test

Conversation

@adydams

@adydams adydams commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

Action : Created the disburse_loan.js and test_config js files
Guide : The disburse_loan.js file is use to run a TDD on the update profile functionality of loan.controller.js file and the test_config js file is where the frisby and token global setup is. The test_config js is required in the disburse_loan.js file
Date : 3rdJuly 2018

@wilforlan wilforlan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What it this file for ?

it ('POST should return a status of 200 OK', function (res) {
return frisby
.put('http://localhost:3000/loans/disburse/5b3c114131124a0d7415c640', {
amountDisbursed: 3500000 ,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are you posting amount disbursed and error message while disbursing the loan. If yes, Why ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The amount disbursed is to be posted by the admin. Peradventure, the total amount of loan requested cannot be disbursed a note is attached to disclose why the entire loan cannot be disbursed. The note will be null if all the amount is been disbursed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is not an error message. It is a short note attached to explain why all the loan cannot be disbursed

Comment thread test_config.js
// Do setup first
frisby.globalSetup({
request: {
headers: {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This should be settable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please, I don't understand the concept of settable. But I wanted it to be globally accessible by my test that is why I made it a root file.

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