Created
March 19, 2019 18:51
-
-
Save Fiyiin/9b85b3a1d56c30bff655b26c44855058 to your computer and use it in GitHub Desktop.
A gist to demo tests for the medium.com codebase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('To Unfollow a User ', () => { | |
it('should return the user profile object', (done) => { | |
request(app) | |
.delete('/api/profiles/:username/follow') | |
.set('Authorization', 'JWT') | |
.expect('Content-Type', /json/) | |
.expect(200) | |
.expect((res) => { | |
expect(res.body).toEqual( | |
{ | |
"profile": { | |
"username": "jake", | |
"bio": "I work at statefarm", | |
"image": "image-link", | |
"following": false | |
} | |
} | |
); | |
}); | |
.end(done) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment