From a360787e380cf08a74300315486b4a3c7fd3a03c Mon Sep 17 00:00:00 2001 From: Hagop Jamkojian Date: Tue, 30 Mar 2021 16:33:43 +0200 Subject: [PATCH] Change fixtures and fix tests --- tests/fixtures/user.fixture.js | 3 +++ tests/integration/auth.test.js | 2 +- tests/integration/user.test.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/fixtures/user.fixture.js b/tests/fixtures/user.fixture.js index c678b944..ba980262 100644 --- a/tests/fixtures/user.fixture.js +++ b/tests/fixtures/user.fixture.js @@ -13,6 +13,7 @@ const userOne = { email: faker.internet.email().toLowerCase(), password, role: 'user', + isEmailVerified: false, }; const userTwo = { @@ -21,6 +22,7 @@ const userTwo = { email: faker.internet.email().toLowerCase(), password, role: 'user', + isEmailVerified: false, }; const admin = { @@ -29,6 +31,7 @@ const admin = { email: faker.internet.email().toLowerCase(), password, role: 'admin', + isEmailVerified: false, }; const insertUsers = async (users) => { diff --git a/tests/integration/auth.test.js b/tests/integration/auth.test.js index 854f48ba..ab8abf74 100644 --- a/tests/integration/auth.test.js +++ b/tests/integration/auth.test.js @@ -97,7 +97,7 @@ describe('Auth routes', () => { name: userOne.name, email: userOne.email, role: userOne.role, - isEmailVerified: false, + isEmailVerified: userOne.isEmailVerified, }); expect(res.body.tokens).toEqual({ diff --git a/tests/integration/user.test.js b/tests/integration/user.test.js index f674bf07..279e4ef4 100644 --- a/tests/integration/user.test.js +++ b/tests/integration/user.test.js @@ -163,7 +163,7 @@ describe('User routes', () => { name: userOne.name, email: userOne.email, role: userOne.role, - isEmailVerified: false, + isEmailVerified: userOne.isEmailVerified, }); }); @@ -366,7 +366,7 @@ describe('User routes', () => { email: userOne.email, name: userOne.name, role: userOne.role, - isEmailVerified: false, + isEmailVerified: userOne.isEmailVerified, }); });