feat: Implement admin user serializer test
This commit is contained in:
@@ -3,14 +3,6 @@ type Query {
|
|||||||
}
|
}
|
||||||
type Mutation {
|
type Mutation {
|
||||||
createConnection(input: CreateConnectionInput): Connection
|
createConnection(input: CreateConnectionInput): Connection
|
||||||
<<<<<<< HEAD
|
|
||||||
createUser(input: CreateUserInput): UserWithAcceptInvitationUrl
|
|
||||||
=======
|
|
||||||
createFlow(input: CreateFlowInput): Flow
|
|
||||||
deleteCurrentUser: Boolean
|
|
||||||
deleteFlow(input: DeleteFlowInput): Boolean
|
|
||||||
deleteStep(input: DeleteStepInput): Step
|
|
||||||
>>>>>>> 3aa20fed (chore: remove redundant create user mutation)
|
|
||||||
executeFlow(input: ExecuteFlowInput): executeFlowType
|
executeFlow(input: ExecuteFlowInput): executeFlowType
|
||||||
generateAuthUrl(input: GenerateAuthUrlInput): AuthLink
|
generateAuthUrl(input: GenerateAuthUrlInput): AuthLink
|
||||||
resetConnection(input: ResetConnectionInput): Connection
|
resetConnection(input: ResetConnectionInput): Connection
|
||||||
|
19
packages/backend/src/serializers/admin/user.test.js
Normal file
19
packages/backend/src/serializers/admin/user.test.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import { createUser } from '../../../test/factories/user';
|
||||||
|
import adminUserSerializer from './user.js';
|
||||||
|
|
||||||
|
describe('adminUserSerializer', () => {
|
||||||
|
let user;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
user = await createUser();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return user data with accept invitation url', async () => {
|
||||||
|
const serializedUser = adminUserSerializer(user);
|
||||||
|
|
||||||
|
expect(serializedUser.acceptInvitationUrl).toEqual(
|
||||||
|
user.acceptInvitationUrl
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user