feat: make role name unique and remove key usage

This commit is contained in:
Ali BARIN
2024-09-04 11:07:45 +00:00
parent b089069b8e
commit 63dfb6947e
33 changed files with 51 additions and 55 deletions

View File

@@ -10,7 +10,7 @@ describe('GET /api/v1/admin/users', () => {
let currentUser, currentUserRole, anotherUser, anotherUserRole, token;
beforeEach(async () => {
currentUserRole = await createRole({ key: 'admin' });
currentUserRole = await createRole({ name: 'Admin' });
currentUser = await createUser({
roleId: currentUserRole.id,
@@ -18,7 +18,6 @@ describe('GET /api/v1/admin/users', () => {
});
anotherUserRole = await createRole({
key: 'anotherUser',
name: 'Another user role',
});