refactor: api key spec to use factories (#16776)

This commit is contained in:
Jason Rasmussen
2025-03-10 12:04:35 -04:00
committed by GitHub
parent fe959b2f05
commit e97df503f2
9 changed files with 150 additions and 82 deletions
-20
View File
@@ -1,20 +0,0 @@
import { authStub } from 'test/fixtures/auth.stub';
import { userStub } from 'test/fixtures/user.stub';
export const keyStub = {
authKey: Object.freeze({
id: 'my-random-guid',
key: 'my-api-key (hashed)',
user: userStub.admin,
permissions: [],
} as any),
admin: Object.freeze({
id: 'my-random-guid',
name: 'My Key',
key: 'my-api-key (hashed)',
userId: authStub.admin.user.id,
user: userStub.admin,
permissions: [],
} as any),
};