From 72cfce7e8ae9b22450892e723fa790a4eeb7340f Mon Sep 17 00:00:00 2001 From: odezig Date: Sun, 3 Mar 2024 01:26:44 +0700 Subject: [PATCH] update variabel and validation email --- test/comments.test.js | 1 + test/profile.test.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/test/comments.test.js b/test/comments.test.js index f4b7fec..801c07c 100644 --- a/test/comments.test.js +++ b/test/comments.test.js @@ -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' }); diff --git a/test/profile.test.js b/test/profile.test.js index 822b3e6..7399b75 100644 --- a/test/profile.test.js +++ b/test/profile.test.js @@ -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) { @@ -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'); });