feat: Implement auth serializer

This commit is contained in:
Faruk AYDIN
2024-02-27 16:24:32 +01:00
parent 63c9442126
commit 356668a68d
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { describe, it, expect } from 'vitest';
import App from '../models/app';
import authSerializer from './auth';
describe('authSerializer', () => {
it('should return auth data', async () => {
const auth = await App.findAuthByKey('deepl');
const expectedPayload = {
fields: auth.fields,
authenticationSteps: auth.authenticationSteps,
reconnectionSteps: auth.reconnectionSteps,
};
expect(authSerializer(auth)).toEqual(expectedPayload);
});
});