Skip to content

Commit

Permalink
update variabel and validation email
Browse files Browse the repository at this point in the history
  • Loading branch information
odezig authored and odezig committed Mar 2, 2024
1 parent 4b303b3 commit 72cfce7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/comments.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('Comment API Tests', () => {
.post('/v1/profiles')
.send({
name: 'La Ode Aris Saputra',
email: 'aris@example.com',
age: 29,
bio: 'Software Developer'
});
Expand Down
3 changes: 3 additions & 0 deletions test/profile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ describe('Profile API Tests', () => {
.post('/v1/profiles')
.send({
name: 'la ode aris saputra',
email: "aris@example.com",
age: 29,
bio: "Software Developer"
});
expect(res.statusCode).toEqual(201);
expect(res.body.data.name).toEqual('la ode aris saputra');
expect(res.body.data.email).toEqual('aris@example.com');
expect(res.body.data.age).toEqual(29);
expect(res.body.data.bio).toEqual('Software Developer');
if (res.body.data && res.body.data._id) {
Expand All @@ -31,6 +33,7 @@ describe('Profile API Tests', () => {
expect(res.statusCode).toEqual(200);
expect(res.body.data._id).toEqual(profileId);
expect(res.body.data.name).toEqual('la ode aris saputra');
expect(res.body.data.email).toEqual('aris@example.com');
expect(res.body.data.age).toEqual(29);
expect(res.body.data.bio).toEqual('Software Developer');
});
Expand Down

0 comments on commit 72cfce7

Please sign in to comment.