Skip to content

Commit

Permalink
test: Add tests for app auth client serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
farukaydin committed Feb 24, 2024
1 parent 832d323 commit 5fac0b4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/backend/src/serializers/app-auth-client.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { describe, it, expect, beforeEach } from 'vitest';
import { createAppAuthClient } from '../../test/factories/app-auth-client';
import appAuthClientSerializer from './app-auth-client';

describe('appAuthClient serializer', () => {
let appAuthClient;

beforeEach(async () => {
appAuthClient = await createAppAuthClient();
});

it('should return app auth client data', async () => {
const expectedPayload = {
id: appAuthClient.id,
appConfigId: appAuthClient.appConfigId,
name: appAuthClient.name,
active: appAuthClient.active,
};

expect(appAuthClientSerializer(appAuthClient)).toEqual(expectedPayload);
});
});

0 comments on commit 5fac0b4

Please sign in to comment.