refactor: convert activity stub to a factory (#16702)
This commit is contained in:
-42
@@ -1,42 +0,0 @@
|
||||
import { ActivityItem } from 'src/types';
|
||||
import { albumStub } from 'test/fixtures/album.stub';
|
||||
import { assetStub } from 'test/fixtures/asset.stub';
|
||||
|
||||
export const activityStub = {
|
||||
oneComment: Object.freeze<ActivityItem>({
|
||||
id: 'activity-1',
|
||||
comment: 'comment',
|
||||
isLiked: false,
|
||||
userId: 'admin_id',
|
||||
user: {
|
||||
id: 'admin_id',
|
||||
name: 'admin',
|
||||
email: 'admin@test.com',
|
||||
profileImagePath: '',
|
||||
profileChangedAt: new Date('2021-01-01'),
|
||||
},
|
||||
assetId: assetStub.image.id,
|
||||
albumId: albumStub.oneAsset.id,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
updateId: 'uuid-v7',
|
||||
}),
|
||||
liked: Object.freeze<ActivityItem>({
|
||||
id: 'activity-2',
|
||||
comment: null,
|
||||
isLiked: true,
|
||||
userId: 'admin_id',
|
||||
user: {
|
||||
id: 'admin_id',
|
||||
name: 'admin',
|
||||
email: 'admin@test.com',
|
||||
profileImagePath: '',
|
||||
profileChangedAt: new Date('2021-01-01'),
|
||||
},
|
||||
assetId: assetStub.image.id,
|
||||
albumId: albumStub.oneAsset.id,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
updateId: 'uuid-v7',
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user