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
32 changed files with 1545 additions and 1538 deletions

25
server/test/fixtures/user-token.stub.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
import { UserTokenEntity } from '@app/infra/entities';
import { userStub } from './user.stub';
export const userTokenStub = {
userToken: Object.freeze<UserTokenEntity>({
id: 'token-id',
token: 'auth_token',
userId: userStub.user1.id,
user: userStub.user1,
createdAt: new Date('2021-01-01'),
updatedAt: new Date(),
deviceType: '',
deviceOS: '',
}),
inactiveToken: Object.freeze<UserTokenEntity>({
id: 'not_active',
token: 'auth_token',
userId: userStub.user1.id,
user: userStub.user1,
createdAt: new Date('2021-01-01'),
updatedAt: new Date('2021-01-01'),
deviceType: 'Mobile',
deviceOS: 'Android',
}),
};