refactor(server): test fixtures (#3491)

This commit is contained in:
Jason Rasmussen 2023-07-31 21:28:07 -04:00 committed by GitHub
parent 5f9dfa9493
commit 9e085c1071
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1545 additions and 1538 deletions

13
server/test/fixtures/api-key.stub.ts vendored Normal file
View file

@ -0,0 +1,13 @@
import { APIKeyEntity } from '@app/infra/entities';
import { authStub } from './auth.stub';
import { userStub } from './user.stub';
export const keyStub = {
admin: Object.freeze({
id: 'my-random-guid',
name: 'My Key',
key: 'my-api-key (hashed)',
userId: authStub.admin.id,
user: userStub.admin,
} as APIKeyEntity),
};