feat(tests): add tests for task attachments
This commit is contained in:
parent
01f648c20c
commit
38fc157f24
2 changed files with 66 additions and 0 deletions
17
cypress/factories/task_attachments.ts
Normal file
17
cypress/factories/task_attachments.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import {Factory} from '../support/factory'
|
||||
import {formatISO} from 'date-fns'
|
||||
|
||||
export class TaskAttachmentFactory extends Factory {
|
||||
static table = 'task_attachments'
|
||||
|
||||
static factory() {
|
||||
const now = new Date()
|
||||
|
||||
return {
|
||||
id: '{increment}',
|
||||
task_id: 1,
|
||||
file_id: 1,
|
||||
created: formatISO(now),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in a new issue