feat(users,professors): add promote student to professor and full student profile aggregation
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
const { describe, it } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const userService = require('./userService');
|
||||
const professorService = require('../professors/professorService');
|
||||
|
||||
describe('Student Profile and Professor Promotion Service Exports', () => {
|
||||
it('exports getUserFullProfile and promoteToProfessor in userService', () => {
|
||||
assert.equal(typeof userService.getUserFullProfile, 'function');
|
||||
assert.equal(typeof userService.promoteToProfessor, 'function');
|
||||
});
|
||||
|
||||
it('exports createProfessorFromUser in professorService', () => {
|
||||
assert.equal(typeof professorService.createProfessorFromUser, 'function');
|
||||
});
|
||||
|
||||
it('throws validation error when userId is missing in createProfessorFromUser', async () => {
|
||||
await assert.rejects(
|
||||
() => professorService.createProfessorFromUser(null),
|
||||
(err) => err.errorCode === 'VALIDATION_FAILED' || err.statusCode === 400
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user