Skip to content

Commit

Permalink
Change fixtures and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Mar 30, 2021
1 parent 412f3fe commit a360787
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tests/fixtures/user.fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const userOne = {
email: faker.internet.email().toLowerCase(),
password,
role: 'user',
isEmailVerified: false,
};

const userTwo = {
Expand All @@ -21,6 +22,7 @@ const userTwo = {
email: faker.internet.email().toLowerCase(),
password,
role: 'user',
isEmailVerified: false,
};

const admin = {
Expand All @@ -29,6 +31,7 @@ const admin = {
email: faker.internet.email().toLowerCase(),
password,
role: 'admin',
isEmailVerified: false,
};

const insertUsers = async (users) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/user.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('User routes', () => {
name: userOne.name,
email: userOne.email,
role: userOne.role,
isEmailVerified: false,
isEmailVerified: userOne.isEmailVerified,
});
});

Expand Down Expand Up @@ -366,7 +366,7 @@ describe('User routes', () => {
email: userOne.email,
name: userOne.name,
role: userOne.role,
isEmailVerified: false,
isEmailVerified: userOne.isEmailVerified,
});
});

Expand Down

0 comments on commit a360787

Please sign in to comment.