make compatible for new Taskable
This commit is contained in:
@@ -16,6 +16,7 @@ describe('Task', () => {
|
|||||||
it('allows a new task from a taskable object', () => {
|
it('allows a new task from a taskable object', () => {
|
||||||
const taskable: Taskable = {
|
const taskable: Taskable = {
|
||||||
id: faker.datatype.uuid(),
|
id: faker.datatype.uuid(),
|
||||||
|
date: faker.date.recent(),
|
||||||
title: faker.animal.lion(),
|
title: faker.animal.lion(),
|
||||||
link: faker.internet.url(),
|
link: faker.internet.url(),
|
||||||
steps: [createStepFixture()]
|
steps: [createStepFixture()]
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export class Task implements Taskable {
|
|||||||
public static fromTaskable(taskable: Taskable) {
|
public static fromTaskable(taskable: Taskable) {
|
||||||
const task = new Task(taskable.id, taskable.title)
|
const task = new Task(taskable.id, taskable.title)
|
||||||
task.link = taskable.link
|
task.link = taskable.link
|
||||||
|
task.date = taskable.date
|
||||||
task.addSteps(...taskable.steps)
|
task.addSteps(...taskable.steps)
|
||||||
|
|
||||||
return task
|
return task
|
||||||
|
|||||||
Reference in New Issue
Block a user