-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add tests for app auth client serializer
- Loading branch information
1 parent
832d323
commit 5fac0b4
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |