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

Profile update test #53

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

Conversation

harshil15999
Copy link

Please see the code and revert back .

Few doubts

  1. havent been able to understand what response should be expected when a POST request is made
  2. Also wanted to confirm whether the POST request has to be made at localhost:3000/user/profile

Resolves #42

I have written the test for user profile please check it and tell me my mistakes.
I did not know how to run it as I havent understood how the person in the codebase is sending which response on updating user profile
@lockedup-bot
Copy link

lockedup-bot bot commented Jun 18, 2020

Thanks @harshil15999, for opening the pull request! 🙌
One of our team-mates will review the pull request soon. ✅

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #53   +/-   ##
=======================================
  Coverage   67.67%   67.67%           
=======================================
  Files           7        7           
  Lines          99       99           
  Branches        5        5           
=======================================
  Hits           67       67           
  Misses         31       31           
  Partials        1        1           

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 50ce3bf...a7179a0. Read the comment docs.

password:'123',
teams:['2','3']
}
chai.request('http://localhost:3000')
Copy link
Member

Choose a reason for hiding this comment

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

not the correct way. check sample code repo

.send(update)
.end((err,res)=>{
res.should.have.status(200);
res.body.should.be.json;
Copy link
Member

Choose a reason for hiding this comment

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

check responses individually, like expect the response to contain new data

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.

New test proposal :Test User Profile Updation
2 participants