- Updated the `generateRoomMemberToken` function to use `joinMeeting` instead of `grantJoinMeetingPermission` for clarity. - Changed test descriptions to reflect the new parameter names and improved readability. - Removed unnecessary imports and cleaned up tests related to recording access configurations. - Updated validation error messages for better clarity in the API responses. - Refactored security configuration tests to align with the new authentication structure. - Removed deprecated tests for room member roles. - Adjusted user profile tests to reflect changes in the response structure.
23 lines
765 B
TypeScript
23 lines
765 B
TypeScript
import { beforeAll, describe, expect, it } from '@jest/globals';
|
|
import { getMe, loginAdminUser, startTestServer } from '../../../helpers/request-helpers.js';
|
|
|
|
describe('Users API Tests', () => {
|
|
let adminAccessToken: string;
|
|
|
|
beforeAll(async () => {
|
|
await startTestServer();
|
|
adminAccessToken = await loginAdminUser();
|
|
});
|
|
|
|
describe('Profile Tests', () => {
|
|
it('should return 200 and admin profile', async () => {
|
|
const response = await getMe(adminAccessToken);
|
|
expect(response.status).toBe(200);
|
|
expect(response.body).toHaveProperty('userId', 'admin');
|
|
expect(response.body).toHaveProperty('name', 'Admin');
|
|
expect(response.body).toHaveProperty('role', 'admin');
|
|
expect(response.body).toHaveProperty('registrationDate');
|
|
});
|
|
});
|
|
});
|